- Timestamp:
-
02/14/15 18:40:48 (9 years ago)
- Author:
-
JM Friedt
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v12
|
v13
|
|
9 | 9 | builder from source with |
10 | 10 | |
| 11 | {{{ |
11 | 12 | ../source-builder/sb-set-builder --log=build-log.txt --prefix=$HOME/prefix/compiler/4.11 4.11/rtems-arm |
| 13 | }}} |
12 | 14 | |
13 | 15 | Having compiled the toolchain, RTEMS is compiled for the STM32F105 BSP following |
14 | 16 | http://s937484.blogspot.fr/2013/10/rtems-stm32f407-discovery-board-posted.html: RTEMS is compiled with |
15 | 17 | |
| 18 | {{{ |
16 | 19 | export PATH=$HOME/prefix/compiler/4.11/bin:$PATH |
17 | 20 | export TARGET="arm-rtems4.11" |
18 | 21 | ./bootstrap |
| 22 | }}} |
19 | 23 | |
20 | 24 | in the RTEMS directory and then in the build directory: |
21 | 25 | |
| 26 | {{{ |
22 | 27 | ../rtems/configure --target=${TARGET} --enable-rtemsbsp=stm32f105rc --enable-tests=samples --prefix=$HOME/prefix/rtems-4.11 |
23 | 28 | make |
24 | 29 | make install |
| 30 | }}} |
25 | 31 | |
26 | 32 | We run the example from the testsuit c/stm32f105rc/testsuites/samples/hello on Qemu supporting the STM32 architecture as described at: https://github.com/beckus/qemu_stm32 |
… |
… |
|
47 | 53 | Having compiled Qemu with these updates, and RTEMS for the STM32F105 BSP, the example is loaded using |
48 | 54 | |
| 55 | {{{ |
49 | 56 | qemu-system-arm -M stm32-p103 -serial stdio -serial stdio -serial stdio -kernel hello.bin |
| 57 | }}} |
50 | 58 | |
51 | 59 | (three times -serial stdio to indicate that all three UART outputs are displayed on stdout). The result is |
| 60 | {{{ |
52 | 61 | VNC server running on `::1:5900' |
53 | 62 | LED Off |
… |
… |
|
55 | 64 | Hello World |
56 | 65 | *** END OF TEST HELLO WORLD *** |
| 66 | }}} |
57 | 67 | |
58 | | For modifying the default UART used by the console, either edit the RTEMS BSP defined in the rtems/c/src/lib/libbsp/arm/stm32f4/configure.ac file and modify RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_3],[*],[1]) for disabling UART3 (remove [1] and replace with []) and activating UART1 (replace [] with [1]). Alternatively, before |
59 | | the configuration step, export variables STM32F4_ENABLE_USART_3="" and STM32F4_ENABLE_USART_1="1" for the same |
| 68 | For modifying the default UART used by the console, either edit the RTEMS BSP defined in the rtems/c/src/lib/libbsp/arm/stm32f4/configure.ac file and modify {{{RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_3],[*],[1])}}} for disabling UART3 (remove [1] and replace with []) and activating UART1 (replace [] with [1]). Alternatively, before |
| 69 | the configuration step, export variables {{{STM32F4_ENABLE_USART_3=""}}} and {{{STM32F4_ENABLE_USART_1="1"}}} for the same |
60 | 70 | effect. Following this modification, the hello.exe example was run successfuly on a STM32F103RCT microcontroller. |
61 | 71 | |