MAC bootloader

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

MAC bootloader

Post by ted456 »

After using this command ; dfu-util -a 0 --dfuse-address 0x08000000 -D firmware.bin ,
I don't have in USB DeviceTree STM32 Bootloader
Attachments
boot 2.png
boot 2.png (120 KiB) Viewed 521 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MAC bootloader

Post by mikeysklar »

Did the firmware upload run successfully?

https://learn.adafruit.com/adafruit-stm ... 3045693-18
Upon success, reset the board without the BOOT0 jumper and you will see after a few seconds the CIRCUITPY disk drive appear

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

I did the first step
1. For Mac users, install dfu-util with brew = OK

The second step
2. Then upload the firmware with the command = = error = dfu-util: Could not open file firmware.bin for reading: No such file or directory
++++++++++++++++++++++++++++++++++++++++++++++++++++
dfu-util -a 0 --dfuse-address 0x08000000 -D firmware.bin
+++++++++++++++++++++++++++++++++++++++++++++++++++
xyz@xyzs-iMac ~ % sudo port install dfu-util
Password:
---> Computing dependencies for dfu-util
---> Cleaning dfu-util
---> Scanning binaries for linking errors
---> No broken files found.
---> No broken ports found.
xyz@xyzs-iMac ~ % dfu-util -a 0 --dfuse-address 0x08000000 -D firmware.bin
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Could not open file firmware.bin for reading: No such file or directory
xyz@xyzs-iMac ~ %

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MAC bootloader

Post by mikeysklar »

Okay, the error message you provided is very helpful.

It appears you are not in the same directory as the firmware.bin file?

Go ahead and download the CircuitPython 7.3.0 bin file to upload and either rename it firmware.bin or use it's default filename and replace the last dfu-util argument to:

Code: Select all

dfu-util -a 0 --dfuse-address 0x08000000 -D adafruit-circuitpython-feather_stm32f405_express-en_US-7.3.0.bin
https://downloads.circuitpython.org/bin ... -7.3.0.bin

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

I can't open CircuitPython to modify it
Attachments
Screen Shot 2022-06-19 at 9.01.31 PM.png
Screen Shot 2022-06-19 at 9.01.31 PM.png (29.25 KiB) Viewed 474 times

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

I think the problem is in this error when I trying to upload using bootloader
/Users/xyz/Documents/Arduino/hardware/Arduino_STM32-master copy/tools/macosx/maple_upload: line 34: /Users/xyz/Documents/Arduino/hardware/Arduino_STM32-master: No such file or directory
An error occurred while uploading the sketch
On the top = I follow error path = maple upload is grey color, on the bottom I opened STM32 master and maple upload is in black color.
Attachments
Screen Shot 2022-06-19 at 9.17.10 PM.png
Screen Shot 2022-06-19 at 9.17.10 PM.png (439.1 KiB) Viewed 474 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MAC bootloader

Post by mikeysklar »

You don't need to modify the CircuitPython file, just run the command-line program dfu-util with the arguments I gave you while in the same directory as the downloaded BIN file.

The upload error you found from the Arduino IDE is helpful. Not finding the maple_upload binary is helpful. It looks as if you downloaded the STM32 board manager code manually through github instead of using the recommended package through the Arduino IDE.

https://learn.adafruit.com/adafruit-stm ... -ide-setup

Can you re-install the STM32 board manager package using the above link directions?

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

I started over, reset the MAC to factory settings, loaded the STM32 board manager from your link, reinstalled the CubeProgramer and follow this instruction for blink
Time to Test:
Connect your STM32 to your USB to Serial:

USB to TTL - STM32
Ground - Ground
5 volts - 5V (make sure USB to TTL is set to 5v, or if 3.3 volt, then connect it to the 3.3 pin)
TX - A10
RX - A9

Move jumper BOOT0 to 1, press reset, load Blink in the Arduino IDE examples.

Under Tools set the following options:
* Board > Generic STM32F1 Series (or what ever you have)
* Board Part Number > BluePill F10C8
* U(S)ART support: Enabled (generic Serial)
* USB Support (if available): None
* Optimize: Smallest (-Os default)
* C Runtime Library: Newlib Nano(default)
* Upload method: STM32CubeProgrammer (Serial)
* Port: (select your USB to TTL serial port)

With everything connected, click upload and you should see a flashing LED.
and got this error:
-------------------------------------------------------------------
STM32CubeProgrammer v2.10.0
-------------------------------------------------------------------

Serial Port cu.usbserial-0001 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,
stop-bit = 1.0, flow-control = off

Timeout error occured while waiting for acknowledgement.

Timeout error occured while waiting for acknowledgement.
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MAC bootloader

Post by mikeysklar »

Thanks for resetting things and for this error output.

Just to confirm you did do the BOOT0 jumper and rest press just before pressing the upload button?
Move jumper BOOT0 to 1, press reset, load Blink in the Arduino IDE examples.

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

Oops, I reversed PB9 and PB10, now LED is blinking, naw i going to test serial monitor.

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

A strange things are happened. 1. Uploading blink program using serial method = Ok 2. Uploading binary code " hid_generic_pc13 " using ST Link = Ok 3. connecting bootloader cable to micro plug, uplowding blink program = Ok
4. I am changing delays in bling program and pressing upload ikon and got an error:
+-----------------------------------------------------------------------+
| HID-Flash v2.2.1 - STM32 HID Bootloader Flash Tool |
| (c) 2018 - Bruno Freitas http://www.brunofreitas.com |
| (c) 2018-2019 - Vassilis Serasidis https://www.serasidis.gr |
| Customized for STM32duino ecosystem https://www.stm32duino.com |
+-----------------------------------------------------------------------+

> Trying to open the [cu.Bluetooth-Incoming-Port]...
> Toggling DTR...
> Searching for [1209:BEBA] device...
##########
An error occurred while uploading the sketch
Error - [1209:BEBA] device is not found :(> Searching for [cu.Bluetooth-Incoming-Port] ...
> [cu.Bluetooth-Incoming-Port] is found !
> Finish
So, I can use bootloar upload method only once, to use it again I have go trough steps 1 to 3 again

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MAC bootloader

Post by mikeysklar »

Congratulations on getting the code to upload and a console.

You need to go back into boot mode (BOOT0 jumper) after an initial code upload to prepare the processor for receiving the next upload.

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

With cable connected to usb micro socket ?
You mean like this ?
Attachments
Programming-STM32-(Blue-Pill)-Directly-Through-USB-Port.jpg
Programming-STM32-(Blue-Pill)-Directly-Through-USB-Port.jpg (45.4 KiB) Viewed 402 times
STM32-Operating-and-Programming-Mode.jpg
STM32-Operating-and-Programming-Mode.jpg (35.03 KiB) Viewed 402 times

User avatar
ted456
 
Posts: 18
Joined: Sat Jun 18, 2022 6:13 am

Re: MAC bootloader

Post by ted456 »

I followed this instruction
https://www.youtube.com/watch?v=Myon8H111PQ
6:30 to 7:20
6:52 = Ok
7:06 = is not working

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MAC bootloader

Post by mikeysklar »

Does the troubleshooting steps mentioned after 7:06 --> 7:49 resolve it?

re-upload bootloader, unplug USB, upload again (maybe an additional upload)

Can you please post a photo of your setup. 800x600 works best.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”