rt-thread icon indicating copy to clipboard operation
rt-thread copied to clipboard

[Bug] Couldn't run board sample application

Open glory-man opened this issue 8 months ago • 10 comments

RT-Thread Version

5.2.0

Hardware Type/Architectures

GD32450Z-EVAL

Develop Toolchain

GCC

Describe the bug

Build & start debug sample located @ bsp\gd32\arm\gd32450z-eval Appl crashed (hard_fault) on

rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END);

call in board\board.c

Image next step in debugger went into hard_fault_handler Image

To prevent this crash I decresed 2 times available memory (in board.h).

#define GD32_SRAM_SIZE         128

Ok. Program started successfully - Led1 blink. I want to see console output. Connect to COM0 (J1) via RS232-USB converter, open serial-port with putty

Image but nothing happens. There is no answer from the board.

What should I do to test rtthread-sample on my board ? With GD32_SRAM_SIZE = 256. Or maybe need some fix on sample?

Other additional context

No response

glory-man avatar Apr 10 '25 10:04 glory-man

do you have keil ide?

supperthomas avatar Apr 10 '25 22:04 supperthomas

do you have keil ide?

I tried to build sample with default rtconfig.py content. But get error

Image

I use keil in eval mode with 32k code limitation.

So I switched to VScode + GCC + Cortex-Debug

glory-man avatar Apr 11 '25 06:04 glory-man

do you have keil ide?

I made only 2 modifications in rtconfig.py

CROSS_TOOL='gcc'

and set path to gcc-toolchain om my PC

EXEC_PATH   = r'C:\Users\XXYYZZ'

glory-man avatar Apr 11 '25 11:04 glory-man

you can use https://www.keil.arm.com/mdk-community/ keil community version

supperthomas avatar Apr 11 '25 13:04 supperthomas

you can use https://www.keil.arm.com/mdk-community/ keil community version

Why should i use keil? I use official example distributed by rt-thread, use of gcc is provided by this example. I have not changed a single line of any supplied file. example built and ran fine on target board, only it does not work. Do you mean that if i use another IDE, then this same example will start working somehow differently?

glory-man avatar Apr 12 '25 17:04 glory-man

you can use https://www.keil.arm.com/mdk-community/ keil community version

Why should i use keil? I use official example distributed by rt-thread, use of gcc is provided by this example. I have not changed a single line of any supplied file. example built and ran fine on target board, only it does not work. Do you mean that if i use another IDE, then this same example will start working somehow differently?

yes maybe the author use keil to test. different ide maybe different hex bin.

supperthomas avatar Apr 13 '25 01:04 supperthomas

yes maybe the author use keil to test. different ide maybe different hex bin.

why then include the ability to use untested toolchain in the official sample?

glory-man avatar Apr 13 '25 19:04 glory-man

I would like to get a comment from the rt-thread (or this sample) developer @Ouxiaolong

glory-man avatar Apr 17 '25 08:04 glory-man

Can anybody help me ?

glory-man avatar Apr 30 '25 08:04 glory-man

you can use https://www.keil.arm.com/mdk-community/ keil community version

ok. I tried to use keil community version. and get error:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
CC build\applications\main.o
Error: C9580E: CT.Compiler5 is not available with the current toolkit and license. Check that ARM_TOOL_VARIANT is set correctly.
Check that your license details are correct in the License Management dialog of MDK. Additional information is available at:
 http://www.keil.com/support/man/docs/license/license_management.htm
 If you need further help, provide this complete error report to your supplier or [email protected].
 - ARMLMD_LICENSE_FILE: unset
 - LM_LICENSE_FILE: unset
 - ARM_TOOL_VARIANT: unset
 - ARM_PRODUCT_PATH: unset
 - Product location: c:\Programms\Development\Keil_v5\ARM\sw\mappings
 - Toolchain location: c:\Programms\Development\Keil_v5\ARM\ARMCC\bin
 - Selected tool variant: mdk_lite
Product: MDK-ARM Lite 5.42
Component: ARM Compiler 5.06 update 7 for Certification (build 960)
Tool: armcc [4d365d]
scons: *** [build\applications\main.o] Error 1
scons: building terminated because of errors.

glory-man avatar Jun 05 '25 09:06 glory-man