Changes between Version 1 and Version 2 of TBR/BSP/STM32F105


Ignore:
Timestamp:
Aug 17, 2014, 9:16:45 PM (5 years ago)
Author:
Jmfriedt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TBR/BSP/STM32F105

    v1 v2  
    22
    33
     4The STM32F105, produced by ST Microelectronics, is part of the STM32F1 series of the lower end
     5CPUs with 64 to 256 kB FLASH and are thus best suited for real time control in industrial applications.
     6
    47The STM32F105 BSP, based on the STM32F4 BSP, is compiled according to
    5 http://alanstechnotes.blogspot.fr/2013/03/setting-up-rtems-development.html
     8http://alanstechnotes.blogspot.fr/2013/03/setting-up-rtems-development.html.
    69
    710Having compiled the toolchain, RTEMS is compiled for the STM32F105 BSP following
     
    1215
    1316The trick is that, as indicated at ftp://ftp.rtems.eu/pub/rrr/RRR_Quick_Start_Guide_en.pdf, the
    14 console is connected to UART3. Qemu as found on the previous GIT site only implements UART2:
    15 edit hw/arm/stm32_p103.c to add both UART1 and UART3 by including
     17console is connected to UART3. Qemu as found on the previous GIT site only implements UART2: the two options
     18are either to add support for UART3 to Qemu, or to move the console to another serial port. The former
     19solution is easiest, the latter most useful for practical applications on real board which might use other
     20UARTs than UART3. For modifying Qemu, edit hw/arm/stm32_p103.c in the Qemu source tree downloaded from
     21the github cite and add both UART1 and UART3 by including
    1622
    1723    DeviceState *uart1 = DEVICE(object_resolve_path("/machine/stm32/uart[1]", NULL));
     
    2430having compiled Qemu with these updates, and RTEMS for the STM32F105 BSP, the example is loaded using
    2531
    26 qemu-system-arm -M stm32-p103 -serial stdio -serial stdio -serial stdio -kernel hello.bin
     32    qemu-system-arm -M stm32-p103 -serial stdio -serial stdio -serial stdio -kernel hello.bin
    2733
    2834(three times -serial stdio to indicate that all three UARTs outputs are displayed on stdout). The result is
     
    3036LED Off
    3137
    32 
     38<nowiki>
    3339   *  BEGIN OF TEST HELLO WORLD ***
    3440Hello World
    3541   *  END OF TEST HELLO WORLD ***
     42</nowiki>
     43
     44For modifying the default UART used by the console, either edit in the RTEMS BSP the rtems/c/src/lib/libbsp/arm/stm32f4/configure.ac file and modify RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_3],[*],[1]) by disabling
     45UART3 (remove [1] and replace with []) and activating UART1 (replace [] with [1]).