Changes between Version 14 and Version 15 of TBR/BSP/STM32_F4


Ignore:
Timestamp:
Jan 1, 2017, 10:55:55 AM (3 years ago)
Author:
JM Friedt
Comment:

RTEMS on STM32F410

Legend:

Unmodified
Added
Removed
Modified
  • TBR/BSP/STM32_F4

    v14 v15  
    11= STM32 F4 =
    22
     3The STM32F4 BSP of RTEMS was tested on a custom board (http://jmfriedt.free.fr/network_analyzer.pdf [in French]) fitted with a STM32F410RBT6 CPU whose serial port number 1 is connected
     4to a RS232 to USB converter: this version of the STM32F4 series only provides 32 KB flash and 128 KB RAM, emphasizing the moderate requirements of RTEMS. The microcontroller is clocked with a 20 MHz resonator.
    35
    4 <!-- When filling in the box,
    5   + Try to include links to other Wiki pages and websites.
    6   + If a field is not applicable, not setting the variable will result in it not being displayed
    7   + If Simulator is not set, then No. is displayed.
    8 
    9 -->
     6In order to get RTEMS running :
     71. compile the toolchain from source as described at https://ftp.rtems.org/pub/rtems/people/chrisj/source-builder/source-builder.html, which requires about 10 GB of free space for the target 4.12/rtems-arm
     82. having compiled the toolchain, export the PATH to include arm-rtems4.12-gcc
     93. git clone the latest release of rtems (4.12 as of January 1st 2017)
     104. export TARGET="arm-rtems4.12"
     11 a. if using a non-8 MHz quartz resonator (as I am doing), edit
     12rtems/c/src/lib/libbsp/arm/stm32f4/configure.ac
     13and replace 8000000 with 20000000 as well as 16000000 with 40000000 (which might overclock the processor, which seems to remain functional)\\
     14 b. if using a serial port other than USART3 (as I am doing), edit
     15rtems/c/src/lib/libbsp/arm/stm32f4/configure.ac
     16and replace \\
     17RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_3],[*],[1])\\
     18RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_USART_3],[enable USART 3])\\
     19with\\
     20RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_1],[*],[1])\\
     21RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_USART_1],[enable USART 1])\\
     22...\\
     23RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_3],[*],[])\\
     24RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_USART_3],[enable USART 3])\\
     25to send console on USART1
     265. in the rtems clone, ./bootstrap
     276. in a build directory next to the rtems clone, ../rtems/configure --target=${TARGET} --enable-rtemsbsp=stm32f4 --enable-tests=samples --prefix=$HOME/my/directory/rtems/4.12
     28 1. in $HOME/my/build/directory/arm-rtems4.12/c/stm32f4/testsuites/samples I had to remove pppd, fileio, iostream, loopback and related applications whose size exceeded the available 32 KB flash
     297. make
     308. make install
     319. in the $HOME/my/build/directory/arm-rtems4.12/c/stm32f4/testsuites/samples/hello:\\
     32sudo stm32flash -w hello.bin /dev/ttyUSB0
     3310. if all goes well, while monitoring at 115200 bauds the virtual serial port output
     34{{{
     35*** BEGIN OF TEST HELLO WORLD ***                           
     36Hello World                                                 
     37*** END OF TEST HELLO WORLD ***                             
     38}}}
    1039
    1140{{Infobox BSP
     
    4574
    4675 *  [http://www.st.com/st-web-ui/static/active/en/resource/technical/document/data_brief/DM00037955.pdf Data Sheet]
    47  *  [http://www.youtube.com/watch?v=RiBJgkLLHmI Informational Video]
     76 *  [http://www.youtube.com/watch?v=RiBJgkLLHmI Informational Video] (no longer active -- January 1st 2017)
    4877
    4978For the set of board manuals please see ST page dedicated to this board: http://www.st.com/stm32f4-discovery
     
    5281= Board Setup =
    5382
     83The STM32F4 will switch to bootloader mode, using the st-link protocol, when BOOT0 is low during the reset sequence.
    5484
    55 If there are special jumper or ROM monitor settings, describe them.
    5685= Downloading and Executing =
    5786
     87sudo stm32flash -w hello.bin /dev/ttyUSB0
    5888
    59 Describe the download procedure.
    6089= Debugging =
    6190
     91At the moment the only validation procedure was to display the message expected from a properly running RTEMS application.
    6292
    63 How do you debug code on this board?  What gdb setup?  BDM, stub, etc?
    6493= Test Reports =
    6594