bb10e0fc25
Add support for the STM32G474 family of microcontrollers and the B-G474E-DPOW1 Discovery Board, which features a STM32G474RET6. This is a major pull request as it adds support for an entirely new family of STM32. This support is implemented in arch/arm/src/stm32 and shares implementation with other STM32 families supported by that code, such as the 'L15xx, 'F10xx, 'F20xx, 'F3xxx, and 'F4xxx. boards/Kconfig: * Make NuttX recognize the existence of b-g474e-dpow1, the B-G474E-DPOW1 Discovery Board. boards/arm/stm32/b-g474e-dpow1/Kconfig: boards/arm/stm32/b-g474e-dpow1/README.txt: boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig: boards/arm/stm32/b-g474e-dpow1/include/board.h: boards/arm/stm32/b-g474e-dpow1/scripts/Make.defs: boards/arm/stm32/b-g474e-dpow1/scripts/ld.script: boards/arm/stm32/b-g474e-dpow1/src/.gitignore: boards/arm/stm32/b-g474e-dpow1/src/Make.defs: boards/arm/stm32/b-g474e-dpow1/src/b-g474e-dpow1.h: boards/arm/stm32/b-g474e-dpow1/src/stm32_appinit.c: boards/arm/stm32/b-g474e-dpow1/src/stm32_autoleds.c: boards/arm/stm32/b-g474e-dpow1/src/stm32_boot.c: boards/arm/stm32/b-g474e-dpow1/src/stm32_userleds.c: * Add minimal support for the B-G474E-DPOW1 Discovery Board. The board boots successfully through to the NSH prompt. NSH runs and is responsive. With big thanks for detailed code review and suggestions: David Sidrane (davids5) Mateusz Szafoni (raiden00) Abdelatif Guettouche (Ouss4)
123 lines
2.7 KiB
Plaintext
123 lines
2.7 KiB
Plaintext
README
|
|
======
|
|
|
|
This is the README file for a port of NuttX to the ST Micro B-G474E-DPOW1
|
|
Discovery kit with STM32G474RE MCU. For more information about this board,
|
|
see:
|
|
|
|
https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/b-g474e-dpow1.html
|
|
|
|
|
|
Contents
|
|
========
|
|
|
|
- Status
|
|
- Development Environment
|
|
- Toolchains
|
|
- Debugging
|
|
- Hardware
|
|
- MCU Clocking
|
|
- GPIOs
|
|
- Buttons
|
|
- LEDs
|
|
- RGB Power LED
|
|
- Serial Consoles
|
|
- Configurations
|
|
|
|
|
|
Status
|
|
======
|
|
|
|
This port boots NuttX through to a functional NSH prompt.
|
|
|
|
|
|
Development Environment
|
|
=======================
|
|
|
|
Toolchains
|
|
----------
|
|
An appropriate ARM toolchain is needed, such as the one built with the
|
|
customized NuttX buildroot or the ready-made GNU Tools for Arm Embedded
|
|
Processors.
|
|
|
|
|
|
Debugging
|
|
---------
|
|
The board incorporates a STLINK-V3E programmer/debugger accessible via the
|
|
Micro-USB Type B connector.
|
|
|
|
To debug with OpenOCD and arm-nuttx-eabi-gdb:
|
|
|
|
* Use 'make menuconfig' to set CONFIG_DEBUG_SYMBOLS and CONFIG_DEBUG_NOOPT.
|
|
To see debug output, e.g., the "ABCDE" printed in __start(), also set
|
|
CONFIG_DEBUG_FEATURES.
|
|
|
|
* Build NuttX.
|
|
|
|
* Flash the code using:
|
|
$ openocd -f interface/stlink.cfg -f target/stm32g4x.cfg -c init \
|
|
-c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
|
|
|
|
* Start GDB with:
|
|
$ arm-nuttx-eabi-gdb -tui nuttx
|
|
|
|
* In GDB:
|
|
(gdb) target remote localhost:3333
|
|
(gdb) monitor reset halt
|
|
(gdb) load
|
|
|
|
|
|
Hardware
|
|
========
|
|
|
|
MCU Clocking
|
|
------------
|
|
By default, the MCU on this board is clocked from the MCU's internal HSI
|
|
clock, and only this option is supported by software at this time.
|
|
|
|
If software support is added for it, the MCU could be clocked from the
|
|
following other sources: a 24 MHz oscillator on X2, MCO from STLINK-V3E, or
|
|
external clock from connector CN9, pin 26.
|
|
|
|
|
|
GPIOs
|
|
-----
|
|
|
|
|
|
Buttons
|
|
-------
|
|
The board has 5 user buttons in the form of a 4-direction "joystick" with a
|
|
selection button (pressing down on the "joystick").
|
|
|
|
|
|
LEDs
|
|
----
|
|
The board has 4 user LEDs.
|
|
|
|
|
|
RGB Power LED
|
|
-------------
|
|
The board has a super bright RGB power LED.
|
|
|
|
Caution: For eye safety, ensure that the power LED is covered by the
|
|
diffuser that comes installed over it.
|
|
|
|
|
|
Serial Consoles
|
|
===============
|
|
|
|
The MCU's USART3 is connected to the on-board STLINK-V3E and exposed to
|
|
the PC as a Virtual COM Port over the same Micro-USB Type B connection used
|
|
for programming/debugging.
|
|
|
|
On Debian Linux, this shows up as /dev/ttyACM0. Other operating systems may
|
|
differ.
|
|
|
|
|
|
Configurations
|
|
==============
|
|
|
|
nsh
|
|
---
|
|
|