I want to create a 'hex' file via 'STM32Duino' (Arduino sketch).

Post here first, or if you can't find a relevant section!
myksj1105
Posts: 54
Joined: Sun Jun 18, 2023 11:35 am

Re: I want to create a 'hex' file via 'STM32Duino' (Arduino sketch).

Post by myksj1105 »

@ag123

1. Uploaded through 'ST-Link 2'.
2. Upload was successful. It goes in well.
3. However, the 'control board' does not operate.

https://drive.google.com/file/d/1dWZzM7 ... sqIOJ/view

Q1) By any chance, does it work by inserting the 'bin' file I created?
Q2) After inserting, what actions should I take on boot1 and boot2?
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: I want to create a 'hex' file via 'STM32Duino' (Arduino sketch).

Post by ag123 »

which core are you using 'libmaple' core
e.g. this
https://github.com/rogerclarkmelbourne/Arduino_STM32
or 'official' STM core
https://github.com/stm32duino/Arduino_Core_STM32

In both cases, you need to select st-link as upload method to build the sketch, that change the start location and memory layout
and in addition, did you try a 'blink' sketch? like this?

Code: Select all

void setup() {
	pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
	digitalWrite(LED_BUILTIN, ! digitalRead(LED_BUILTIN));
	delay(500);
}
these are the 'basic' things, the led need to blink. then for Serial, make sure to select USB CDC ACM as Serial for the 'official' STM core.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: I want to create a 'hex' file via 'STM32Duino' (Arduino sketch).

Post by ag123 »

there is another thing about 'stm32f103c8 blue pill' type boards, some of them use a 10k ohm pull up resistor instead of a 1k ohm pull up resistor for USB.
that cause some problems for some computers, but works ok on a lot of others.

linux has a little utility called usbreset, does a usb reset ('single ended zero')
https://github.com/jkulesza/usbreset
that can get the port to enumerate again

in windows, I think one way is to disable and enable the device in device manager.
myksj1105
Posts: 54
Joined: Sun Jun 18, 2023 11:35 am

Re: I want to create a 'hex' file via 'STM32Duino' (Arduino sketch).

Post by myksj1105 »

@ag123

Thank you very much for your kind explanation.
'You need to select st-link as upload method to build the sketch'

To recap:
1. Firmware can be uploaded to programs other than Arduino Sketch through the 'bin' file.
2. When creating '.bin' in the Arduino sketch, it must be created through 'ST-LINK'.
1,2 with success. Thank you sincerely.
Post Reply

Return to “General discussion”