First steps with STM32F429 discovery

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
AlexanderL
Posts: 2
Joined: Thu May 07, 2015 10:14 am

First steps with STM32F429 discovery

Post by AlexanderL » Thu May 07, 2015 10:22 am

Hi there,

first of all, cool project and fancy new forum :)
I've been trying to get a simple blink example to work on my STM32F429 discovery board (the one with the display). I followed the installation instructions and use Arduino 1.6.3. Here is my code:

Code: Select all

void setup() {
  pinMode(PG13,OUTPUT);
  pinMode(PG14,OUTPUT);
}


void loop() {  
  digitalWrite(PG13,HIGH);    
  digitalWrite(PG14,LOW);

  delay(250);
  
  digitalWrite(PG13,LOW);
  digitalWrite(PG14,HIGH);
  
  delay(250);
}
I know that STMF4 support is at the beginning, but this should be working, right? However i ran into some issues.

1. When i try to flash the program via the Arduino IDE, i get these error messages:

Code: Select all

stlink_sram_flash() == -1
2015-05-07T12:08:49 INFO src/stlink-common.c: Loading device parameters....
2015-05-07T12:08:49 WARN src/stlink-common.c: unknown chip id! 0x10036419
2. However, i don't need to use the Arduino IDE to flash, right?
I used ST-Link to upload the .bin-file, is this legit? Everything seemed ok, however i have no flashing LEDs on the board.

What am i missing here?

One more thing, during compilation, i get several of these warnings:

Code: Select all

C:\Users\leupold\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\exc.S:1:0: warning: switch -mcpu=cortex-m4 conflicts with -march=armv7-m switch [enabled by default]

C:\Users\leupold\Documents\Arduino\hardware\Arduino_STM32\STM32F4\variants\discovery_f407\stm32_isrs.S:1:0: warning: switch -mcpu=cortex-m4 conflicts with -march=armv7-m switch [enabled by default]
 /* STM32 ISR weak declarations */
 ^
 
Could this be an issue?

Regards,
Alex

User avatar
RogerClark
Posts: 7544
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: First steps with STM32F429 discovery

Post by RogerClark » Fri May 08, 2015 10:34 am

uploading using ST's stlink uploader should be fine

I suspect perhaps there is something fundamentally different between the F407 which does work (I and one other person has one) and the 429

Can you post your test code

User avatar
sheepdoll
Posts: 238
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: First steps with STM32F429 discovery

Post by sheepdoll » Wed May 27, 2015 5:50 pm

Any progress on this? I have two of these boards and am looking at what needs to be modified in board.txt and platform.txt to see if I can talk to it.

User avatar
RogerClark
Posts: 7544
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: First steps with STM32F429 discovery

Post by RogerClark » Wed May 27, 2015 9:06 pm

The change was in tools/win/stlink_upload.bat

I'm afraid that its not going to work on OSX or Linux

The version of the stlink firmware on the F429 board does not seem to be compatible with the open source stlink uploader (texans stlink). There does not seem to be any alternative solution for mac or Linux users :-( :-(

Well, if you can find any info on how to upload from mac or Linux to the discovery F429 board please let me know and I will update the repo.

Personally, I'm probably going to reflash by F407 stlink chip with Black Magic Probe.
There is a link to an blog page on how to do this, but I don't have it to hand at the moment, you could take a look in the Black Magic Probe thread and see if Rick linked to it, or possibly just google it ;-)

User avatar
martinayotte
Posts: 1234
Joined: Mon Apr 27, 2015 1:45 pm

Re: First steps with STM32F429 discovery

Post by martinayotte » Thu May 28, 2015 11:12 pm

I don't know if this help, but I downloaded this one several months ago because this tool allows also to read Flash to do backup, which I did to backup my STM32F429_Discovery. (I didn't try burning flash yet, it still has it original demo firmware).

https://code.google.com/p/stm32flash/

User avatar
RogerClark
Posts: 7544
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: First steps with STM32F429 discovery

Post by RogerClark » Thu May 28, 2015 11:17 pm

Martin

(LOL)

We already use it on the F1, its in the tools folder. All OS's use the binaries from it, and I thought I'd put the source in the repo, as Google are closing down google code.

Yes. its in /tools/src/stm32flash_serial


I will take a look at adding it as an option to the F4

User avatar
martinayotte
Posts: 1234
Joined: Mon Apr 27, 2015 1:45 pm

Re: First steps with STM32F429 discovery

Post by martinayotte » Fri May 29, 2015 3:05 pm

Hi Roger,
Oupps ! they are so many things around (especially on my PCs), at least it gave me opportunities to update some (my old one was stm32flash-0.3beta2, now it is 0.4 :) )

Back to the other subject, I've un-dusted my STM32F429, and I used the Texane ST-Flash to do again a new backup of the Demo firmware.
It worked ! I diffed both backups and they are identical.
So, maybe the ST-Link firmware on my board is compliant, I will try to flash something new later ...

Code: Select all

>st-flash read newbackup.bin 0x8000000 
2015-05-29T10:42:35 INFO src/stlink-common.c: Loading device parameters....
2015-05-29T10:42:35 INFO src/stlink-common.c: Device connected is: F42x and F43x device, id 0x10036419
2015-05-29T10:42:35 INFO src/stlink-common.c: SRAM size: 0x40000 bytes (256 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 16384 bytes
>diff newbackup.bin STM32F429I-Demo-ORIG.bin

User avatar
RogerClark
Posts: 7544
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: First steps with STM32F429 discovery

Post by RogerClark » Fri May 29, 2015 10:10 pm

Martin

On the PC I changed the stlink_upload.bat to use STMs Stlink exe, as Texane doesn't seem to work with around 50% of the boards with on-board stlink e..g STM discover and STM Nucleo

I'm afraid anyone on OSX or Linux that has problems with Texane has no option but to reflash their stlink chip , but I know that's a big step as there is no way back as the stlink binaries are not officially available of re flashing

STM should really provide the binaries, but I know they don't do this for IP and commercial reasons. But as I've posted before, I think its a flawed decision

User avatar
Rick Kimball
Posts: 1067
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: First steps with STM32F429 discovery

Post by Rick Kimball » Fri May 29, 2015 10:12 pm

Have you tried openocd instead of st-flash? I know that works with everything I have. ST-Link V1, V2 and V2.1. It already has entries in scripts/boards for these:

Code: Select all

$ ls st*
steval_pcc010.cfg          stm3210e_eval.cfg         stm32429i_eval_stlink.cfg  stm32f429discovery.cfg  st_nucleo_f103rb.cfg
stm320518_eval.cfg         stm3220g_eval.cfg         stm32439i_eval.cfg         stm32f4discovery.cfg    st_nucleo_f3.cfg
stm320518_eval_stlink.cfg  stm3220g_eval_stlink.cfg  stm32439i_eval_stlink.cfg  stm32l0discovery.cfg    st_nucleo_f4.cfg
stm32100b_eval.cfg         stm3241g_eval.cfg         stm32f0discovery.cfg       stm32ldiscovery.cfg     st_nucleo_l1.cfg
stm3210b_eval.cfg          stm3241g_eval_stlink.cfg  stm32f334discovery.cfg     stm32vldiscovery.cfg    str910-eval.cfg
stm3210c_eval.cfg          stm32429i_eval.cfg        stm32f3discovery.cfg       st_nucleo_f0.cfg
Last edited by Rick Kimball on Fri May 29, 2015 10:16 pm, edited 1 time in total.
-rick

User avatar
RogerClark
Posts: 7544
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: First steps with STM32F429 discovery

Post by RogerClark » Fri May 29, 2015 10:15 pm

Not tried it

Can you post some links

Are there any windows binaries ?

Post Reply