arduino on fysetc s6 board-STM32F446VE

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
ag123
Posts: 1657
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: arduino on fysetc s6 board-STM32F446VE

Post by ag123 »

well, you need to use your own 'firmware', your sketch that is. Normally, somewhere in Arduino IDE menu Sketch->"Export compiled binary" or such.
I think the binary would be left in your sketch folder. Then you can use STM32CubeProgrammer to program it manually.
If you install the STM32CubeProgrammer, check in the menus, you may be able to do that directly in the Arduino IDE.
But the BOOT0 and RESET buttons steps are the same. i.e. complete pressing the buttons, then click download

And you need to update your local variant.cpp file as mentioned prior and rebuild.
viewtopic.php?p=8619#p8619

The start address is 0x8000000 start of flash.
s6 noob
Posts: 15
Joined: Mon Apr 05, 2021 1:45 pm

Re: arduino on fysetc s6 board-STM32F446VE

Post by s6 noob »

Hi ag,

ok, so if I understand correctly- get the binary from arduino and then "paste" into cubeprogrammer?
but what about the "boot file"?

still having the port issue- will try with other type ports

thx!
Last edited by s6 noob on Wed Oct 06, 2021 12:26 pm, edited 1 time in total.
ag123
Posts: 1657
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: arduino on fysetc s6 board-STM32F446VE

Post by ag123 »

yup, yes.

make sure you have patched the variant.cpp file accordingly
viewtopic.php?p=8619#p8619

Select your board in Arduino IDE.
Select USB CDC Serial for Serial.
Check if you can choose STM32CubeProgrammer DFU as download/upload method. if you can do so, choose that.

create a sketch, e.g.

Code: Select all

void setup() {
	Serial.begin();
}

void loop() {
	Serial.println("hello world");
	delay(1000);
}
if it is supported in the IDE, you can complete pressing the BOOT0 and RESET buttons seqnence to use DFU programming.
Then click 'upload' in Arduino IDE to build and install the sketch.
Otherwise, you can use from the menu Sketch > export compiled binary.
It should leave a sketch.bin file in your sketch folder.

Then you can use that same BOOT0 and RESET button presses and use STM32CubeProgrammer to program it manually.
Address is 0x8000000. this should be default for start of flash.

For the above sketch, u'd see the message from your board when you connect in the serial terminal.

A more robust way to test is to blink a led on the board. For that you'd need to figure out where is the led or connect a led to blink it.
Last edited by ag123 on Wed Oct 06, 2021 12:40 pm, edited 3 times in total.
s6 noob
Posts: 15
Joined: Mon Apr 05, 2021 1:45 pm

Re: arduino on fysetc s6 board-STM32F446VE

Post by s6 noob »

still no port avail on arduino.....


saw your edit
----
variant cpp patch.. looked it up
https://github.com/arduino/ArduinoCore- ... ariant.cpp

but won't this screw up the current pin out designations?
ag123
Posts: 1657
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: arduino on fysetc s6 board-STM32F446VE

Post by ag123 »

Not that one, check inside your

Code: Select all

%APPDATA%\Arduino15\packages\
folder
https://support.arduino.cc/hc/en-us/art ... s-located-

You need to find where your STM32Duino core is installed. Then you need to find the variant file for your board.
Last edited by ag123 on Thu Oct 07, 2021 7:11 am, edited 1 time in total.
s6 noob
Posts: 15
Joined: Mon Apr 05, 2021 1:45 pm

Re: arduino on fysetc s6 board-STM32F446VE

Post by s6 noob »

hmm, confused, like a true noob

need to think, will get back- thx!
s6 noob
Posts: 15
Joined: Mon Apr 05, 2021 1:45 pm

Re: arduino on fysetc s6 board-STM32F446VE

Post by s6 noob »

ok

the fysetc site has this procedure to load the "firmware" via the cubeprogrammer

as you mentioned- one can take a binary sketch export from arduino, and load it directly into the cube prog

where does this leave this firmware from fysetc- not required? the firmware is the "bootloader" right?
can the binary work directly without the fysetc procedure?

if so- any program mods will still need to take place in arduino ide?

thx
ag123
Posts: 1657
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: arduino on fysetc s6 board-STM32F446VE

Post by ag123 »

It, STM32F446, doesn't need a 'boot loader', its internal DFU (device firmware update) that you enable using BOOT0 and RESET is that boot loader.
What you are uploading is your firmware (the sketch), there is no need of a separate boot loader
Post Reply

Return to “IDE's”