Page 3 of 3

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Tue Oct 05, 2021 2:54 pm
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.

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Wed Oct 06, 2021 12:01 pm
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!

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Wed Oct 06, 2021 12:24 pm
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.

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Wed Oct 06, 2021 12:32 pm
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?

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Wed Oct 06, 2021 12:35 pm
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.

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Wed Oct 06, 2021 12:53 pm
by s6 noob
hmm, confused, like a true noob

need to think, will get back- thx!

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Wed Oct 06, 2021 2:14 pm
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

Re: arduino on fysetc s6 board-STM32F446VE

Posted: Wed Oct 06, 2021 3:07 pm
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