rt-thread-official/bsp/lpc55sxx/lpc55s69_nxp_evk
Yilin Sun 4570a9047d [bsp][lpc55sxx] GNU toolchain: fix broken port.
1 - The current linker flags undefines `Reset_Handler' and uses `entry()' as
default entry point (specified by `-e'), which will cause a invalid reset
vector in the image without proper crt0 init assembly routine.

2 - The default startup files provided by NXP violate the crt0 assumption
that bss section will be filled with zero unless macro `__STARTUP_CLEAR_BSS'
is defined. This will cause RTT hook funtion pointers set to non-NULL values at
kernel start, thus successfully passes the `RT_nnnn_HOOK_CALL` checks
and jumps to an invalid pointer.

3 - The default heap size used by TCB and kernel objects are set by
linker file macros, which is 0x400 (1024 bytes). The size is too small
for main task and the allocation will fail before the first task being created.

This patch restores Reset_Handler as default reset vector and executes
entry by replacing __START from newlib, defines the
`__STARTUP_CLEAR_BSS` macro to forcibly zeroize the bss section to avoid
unexpected hard faults, set proper heap sizes based on the SRAM sizes.
Some unused compiler/linker flags are also removed or replaced to avoid
future confusion.

The heap sizes for different devices are:
* LPC55(S)69/LPC55(S)28:            64kB
* LPC55(S)06/LPC55(S)16/LPC55(S)36: 32kB

Signed-off-by: Yilin Sun <imi415@imi.moe>
2024-02-07 21:57:28 -05:00
..
applications [bsp][lpc55sxx]add: adaptation LVGL (#7585) 2023-05-31 00:50:19 -04:00
board [bsp][lpc55sxx] Add RTT constant table sections to GNU lds. 2024-02-07 21:57:28 -05:00
figures bsp][LPC55S69] README文档增加keil版本编译报错解决方案 (#6910) 2023-02-06 22:15:42 -05:00
.config [bsp][lpc55sxx] Update default configs for LPC5500 series. 2024-02-07 21:57:28 -05:00
.gitignore [nxp][lpc55sxx] add status to lpc_i2c_bus in drv_i2c for lpc55sxx. (#6935) 2023-02-19 23:09:27 -05:00
Kconfig format Kconfig and sconscript 2023-01-08 22:52:13 -05:00
README.md [bsp][lpc55s69]update:drv_hwtimer (#7385) 2023-04-28 17:44:40 +08:00
README_zh.md [bsp][lpc55s69]update:drv_hwtimer (#7385) 2023-04-28 17:44:40 +08:00
SConscript added LPC55S6x BSP 2019-10-24 17:56:09 +08:00
SConstruct [Scons][iar][iccarm] IAR统一使用iccarm作为判断条件而不是是用IDE的名字来进行判断 2022-06-09 07:01:59 +08:00
flashdebug.ini added LPC55S6x BSP 2019-10-24 17:56:09 +08:00
project.ewd Bsp lpc55sxx (#6897) 2023-02-02 16:41:14 +08:00
project.ewp [project] update mdk/iar project and config. 2023-10-08 11:21:00 +08:00
project.ewt [bsp][lpc55sxx] add support of LPC5528/LPC55S28 (#6667) 2022-11-29 19:56:50 -05:00
project.eww added LPC55S6x BSP 2019-10-24 17:56:09 +08:00
project.uvoptx [project] update mdk/iar project and config. 2023-10-08 11:21:00 +08:00
project.uvprojx [project] update mdk/iar project and config. 2023-10-08 11:21:00 +08:00
rtconfig.h [bsp][lpc55sxx] Update default configs for LPC5500 series. 2024-02-07 21:57:28 -05:00
rtconfig.py [bsp][lpc55sxx] GNU toolchain: fix broken port. 2024-02-07 21:57:28 -05:00
template.ewd [bsp][lpc55sxx] add support of LPC5528/LPC55S28 (#6667) 2022-11-29 19:56:50 -05:00
template.ewp [bsp][lpc55sxx] add support of LPC5528/LPC55S28 (#6667) 2022-11-29 19:56:50 -05:00
template.ewt [bsp][lpc55sxx] add support of LPC5528/LPC55S28 (#6667) 2022-11-29 19:56:50 -05:00
template.eww [bsp][lpc55sxx] add support of LPC5528/LPC55S28 (#6667) 2022-11-29 19:56:50 -05:00
template.uvoptx [bsp][lpc55sxx] update NXP SDK to 2_12_0 2022-11-27 21:01:12 -05:00
template.uvprojx [bsp][lpc55sxx] add support of LPC5528/LPC55S28 (#6667) 2022-11-29 19:56:50 -05:00

README.md

LPC55S69-EVK BSP Introduction

English | 中文

1. Introduction

The LPC55S69 is a high-performance microcontroller based on the Cortex-M33 core from NXP Semiconductors. Includes the following hardware features:

HARDWARE DESCRIPTION
Chip model LPC556x/LPC55S6x Full range
CPU Cortex-M33 Dual Core, with FPU
Frequency 150MHz
Basic peripherals 8 x Flexcomm (optionally configured as USART/SPI/I2C/I2S) / 1 x 50MHz SPI / Dual USB (1 H and 1 Full, Master-Slave Support)
Characteristic PowerQuad DSP coprocessor/security peripheral: PRINCE/PUF/CASPER/AES-256/HASH

2. Hardware development system

Schematic diagram of the development board

3. Quickly Get Started

ENVIRONMENT DESCRIPTION
PC Operating System Linux/MacOS/Windows
Compiler arm-none-eabi-gcc version 6.3.1 20170620 (release)/armcc/iar
Build tools scons/mdk5/iar
Depends Env tool/(MDK or IAR or arm-none-eabi-gcc)/git/debugger driver
  1. Download the source code
    git clone https://github.com/RT-Thread/rt-thread.git
  1. Configure the project and prepare the ENV

Linux/Mac

    cd rt-thread/bsp/lpc55s69_evk
    scons --menuconfig
    source ~/.env/env.sh
    pkgs --upgrade

Windows

Download the ENV toolkit [RT-Thread][1]

  1. Configure the chip model

Linux/Mac

    scons --menuconfig

Windows(use ENV)

    menuconfig

On the menuconfig page, configure and select the corresponding chip model, if the development environment is MDK/IAR, you need to generate the project.

  1. Build Project (please skip this step under Mac/Linux)

Windows IAR

    SET RTT_CC=iar
    scons --target=iar -s

Windows MDK5*

    scons --target=mdk5 -s

*This board support package does not support projects that generate MDK4

MDK and IAR must manually select the chip signal once in the project after the project is built, otherwise a serious compilation error will be generated.


Note: Because some versions of Keil5 have issues with AC6 compiler support, it is recommended to upgrade keil to the latest version

Download the latest version of Keil here

Some error messages are as follows:

Or you can choose to refer to this forum post:AC6 compiler error unsupported option '--c99' solution


  1. Compile

To use the MDK or IAR, see the corresponding tutorial

Windows arm-none-eabi-gcc Use the following command to set the GCC path

    SET RTT_EXEC_PATH=[GCC path]

Linux/Mac arm-none-eabi-gcc Use the following command to set the GCC path

    export RTT_EXEC_PATH=[GCC path]

CompileWindowsLinux/Mac arm-none-eabi-gcc

    scons -j4

Or use the scons --exec-path="GCC toolchain path"command to compile directly while specifying the toolchain location.

The following message indicates that the compilation was successful

    LINK rtthread-lpc55s69.elf
    arm-none-eabi-objcopy -O binary rtthread-lpc55s6x.elf rtthread.bin
    arm-none-eabi-size rtthread-lpc55s69.elf
    text    data     bss     dec     hex filename
    41596     356    1456   43408    a990 rtthread-lpc55s6x.elf
    scons: done building targets.

If compiled correctly, the rtthread-lpc55s6x.elf, rtthread.bin file will be generated. where rtthread .bin binary firmware

3. Download and Execution

Programming can use emulators, ISPs, and other ways to repeat them here.

3.1 Running Results

If the compilation & programming is correct, you will see the RT-Thread startup logo information on the Flexcomm0 serial port*:

 \ | /
- RT -     Thread Operating System
 / | \     4.0.1 build Jul 30 2019
 2006 - 2019 Copyright by rt-thread team
uising armclang, version: 6120001
msh />

*Default serial port

4. Peripheral Condition

On-board Peripherals Support Remark
UART yes UART0/2
GPIO yes Automatically selects the pinout based on the chip model
SPI yes Support High Speed SPI
USB Device no
USB Host no
Windowed WatchDog no
ADC no
I2C yes Can be used with MMA8562
I2C Sensor yes Acquire onboard MMA8562 accelerometer data
RTC yes RTC clock auto-configuration
SDIO yes Operate the SD card
I2S no

5.Notes

  • Please use env (v1.3.5) download
  • Please use the version is higher than 5.3 keil

6. Maintained By