mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-02 16:30:25 +08:00
4570a9047d
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>
RT-THREAD bsp company list
- Simulator
- STM32
- stm32 series
- NXP
- Renesas
- renesas series
- rx series
- upd70f3454
- m16c62p
- Nordic
- nrf5x series
- raspberry
- raspberry-pi series
- raspberry-pico
- TI
- Samsung
- Synopsys
- synopsys series
- Espressif
- MAXIM
- maxim series
- Microchip
- Infineon
- SiFive
- ADI
- Silicon Labs
- efm32 series
- Ambiq Micro
- Xilinx
- Altera
- Nuclei
- 灵动微MM32
- 兆易创新GD32
- gd32 series
- Realtek
- 国民科技N32
- 小华HC32
- 全志Allwinner
- allwinner series
- allwinner_tina
- 雅特力AT32
- at32 series
- rockchip
- rockchip serise
- 先楫
- hpmicro series
- 东软EastSoft
- essemi series
- 嘉楠canaan
- 沁恒WCH
- wch series
- 联德盛winnermicro
- 泰为
- Nuvoton
- nuvoton series
- 飞腾
- 合宙
- airm2m series
- ACM32 航芯
- acm32 series
- APM32 极海
- apm32 series
- 紫芯
- 博流
- bouffalo_lab series
- 航顺
- hk32 series
- 辉芒微
- ft32 series
- 华芯微特
- synwit series
- 龙芯
- loongson series
- 中科蓝讯
- bluetrum series
- 易兆微
- yichip series
- 杭州万高科技
- Vango series
- 平头哥
- 复旦微
- 无锡纳瓦特Navota
- 杭州中天微
- 中国航天科技集团
- 东南芯
- 京微雅格
- 好钜润 TIKY