Git Product home page Git Product logo

hw-boot-selection's People

Contributors

bentglasstube avatar stecman avatar tobiasgiese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hw-boot-selection's Issues

Add support to build for STM32F103 (common "blue pill" dev board)

This project is currently set up to build for just the STM32F070, including some specific configuration required for the F6 package of that chip that is unlikely to compile for other STM32 models.

To make this a little more accessible, it would be good to add support for building for the STM32F103, which is far more common on cheap development boards than the chip I've used.

unable to enumerate USB device

I bought a fresh STM32F103 (blue pill), as I initially bought a CKS32F103.

The problem now is, that the device will not be recognized as a USB device.

Aug 17 11:39:07 tobias-linux kernel: usb 1-4: new full-speed USB device number 115 using xhci_hcd
Aug 17 11:39:07 tobias-linux kernel: usb 1-4: Device not responding to setup address.
Aug 17 11:39:07 tobias-linux kernel: usb 1-4: Device not responding to setup address.
Aug 17 11:39:08 tobias-linux kernel: usb 1-4: device not accepting address 115, error -71
Aug 17 11:39:08 tobias-linux kernel: usb usb1-port4: unable to enumerate USB device

If I plug in my clone stm32, I will get the following

Aug 17 11:39:54 tobias-linux kernel: usb 1-4: new full-speed USB device number 116 using xhci_hcd
Aug 17 11:39:54 tobias-linux kernel: usb 1-4: device descriptor read/64, error -71
Aug 17 11:39:54 tobias-linux kernel: usb 1-4: New USB device found, idVendor=26ba, idProduct=8003, bcdDevice= 2.00
Aug 17 11:39:54 tobias-linux kernel: usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 17 11:39:54 tobias-linux kernel: usb 1-4: Product: Boot Switch
Aug 17 11:39:54 tobias-linux kernel: usb 1-4: Manufacturer: Stecman
Aug 17 11:39:54 tobias-linux kernel: usb 1-4: SerialNumber: D000000000E7
Aug 17 11:39:54 tobias-linux kernel: usb-storage 1-4:1.0: USB Mass Storage device detected
Aug 17 11:39:54 tobias-linux kernel: scsi host7: usb-storage 1-4:1.0

But flashing was successful of the new real STM32.

$ make flash PROGRAMMER=stlink
  LD	boot-swtich.stm32f103c8.elf
  OBJCOPY	boot-swtich.stm32f103c8.bin

Firmware size (boot-swtich.stm32f103c8.elf):

   text	   data	    bss	    dec	    hex	filename
   8128	    112	   1020	   9260	   242c	boot-swtich.stm32f103c8.elf

Flash: 12% (8240 / 65536 bytes)
RAM: 5% (1132 / 20480 bytes)

BINARY=boot-swtich.stm32f103c8.elf openocd -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32f1x.cfg -f openocd.cfg -c 'program_and_run ()'
Open On-Chip Debugger 0.11.0-rc2
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
attach
Info : clock speed 1000 kHz
Info : STLINK V2J17S4 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.205253
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f1x.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080016a8 msp: 0x20005000
Info : device id = 0x10006412
Info : flash size = 32kbytes
shutdown command invoked

Do you have any idea? Unfortunately I'm no hardware programmer.
I'm thankful for any help :)

Error while flashing

I get this output while executing make flash PROGRAMMER=stlink :

  LD boot-swtich.stm32f103c8.elf
  OBJCOPY	boot-swtich.stm32f103c8.bin

Firmware size (boot-swtich.stm32f103c8.elf):

   text	   data	    bss	    dec	    hex	filename
   8128	    112	   1020	   9260	   242c	boot-swtich.stm32f103c8.elf

Flash: 12% (8240 / 65536 bytes)
RAM: 5% (1132 / 20480 bytes)

BINARY=boot-swtich.stm32f103c8.elf openocd -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32f1x.cfg -f openocd.cfg -c 'program_and_run ()'
Open On-Chip Debugger 0.11.0-rc2
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
attach
Info : clock speed 1000 kHz
Info : STLINK V2J29S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.232848
Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x1ba01477
openocd.cfg:16: Error: 
in procedure 'program_and_run' 
in procedure 'program' called at file "openocd.cfg", line 16

make: *** [Makefile:64: flash] Error 1

I'm new to st-link programming so any help is appreciated

Only works without --no-floppy, got "python\r not found" for libopencm3 compilation

Just wanted to let you know that I only got it working after I removed the "--no-floppy" option from the grub search command.
I also had to run dos2unix on all files before libopencm3 compiled properly. I got the error message: /usr/bin/env 'python\r' no such file or directory

Not really an issue, just wanted to share my experience. Amazing project by the way!

GRUB 2.06 doesn't recognize filesystem on device.

Hello, I have followed the instructions in this github and the hackaday post and while I am in linux I can mount the "drive" and see the FAT filesystem and files. However, when I drop to a grub shell and attempt to see the files I get this:

grub> ls (hd0)
Device hd0: No known filesystem detected - Sector size 512B - Total size 64KiB

I have another drive which is Arch Linux installation media and grub can identify that one as having a FAT partition just fine. Do you have any suggestions for how to debug this further?

Q/A

Very happy with the project, not an issue, just i though it would be easier for some people if you add to the readme a couple things.

  1. Switch is pull up detected on pin A6, so switch must be connected to A6 pin and GND.(As you published binaries , so they dont have to scroll through the code).
  2. Depending on the mobo the usb devices are not detected on grub, change from "fast boot" to "normal boot", nativedisk could also be used but it can make your grub not to know how to boot into windows as there is some problem with chainloader.
  3. The grub file to edit is, /boot/grub/grub.cfg(eventhough it is not recommended), as if you edit /etc/default/grub when you try to sudo update-grub it wont work. Also just paste it at the end of the file.(This can seem straight forward, but it isnt for newbies).

Component List

Would love to build one of these but I'm missing the components you're using. What are the models? Or names?

Linux can't find USB device

I recognize there's a similar issue that's already closed, but I have been unable to resolve the issue. I'll provide the same information.

  • I'm using the stm32f103c8 "blue pill".
  • I am using a st-link v2 cloner to flash. I was unable to flash using stlink, but i am able to successfully flash using st-flash. However, I cannot get ubuntu (let alone grub) to recognize the device in any way.
  • Printing lsusb, does not list the device. Nor does blkid.
  • The only things listed in the grub menu are my actual harddrives.
  • I am able to reformat a flashdrive as FAT12 and both ubuntu and grub recognize it as such.
  • grub version: grub-install (GRUB) 2.06-2ubuntu7
  • search --fs-uuid 55AA-6922 returns device not found
  • I am able to flash a blinking led program with success

My only thoughts are something has changed in the libopencm3 api making the usb initialization is not work?

Only warning i get when flashing is regarding nRST and i assume that is not related.

Let me know if anyone has any thoughts, thanks!

Add options to flash using an stlink-v2

openocd-jlink.cfg currently needs to be modified if someone wants to program their device using an ST-Link.

Allow specifying the programmer to use as a parameter to make flash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.