How to solve the problem that the Keil project can only run in debug mode but can't be executed normally when developing machine learning programs

, Dec 17, 2024|
0
13
0

How to solve the problem that the Keil project can only run in debug mode but can't be executed normally when developing machine learning programs in C++ with the Nuvoton evaluation board and Arm library?   Issue Date:2023-05-02

When the Keil project can run in debug mode but will get stuck if it is not connected to ICE in free-run mode, and it is found that the program continues to be stuck at a breakpoint from the debug mode, it may be a semihosting error.
If some error messages such as "stdout/stdin/stderr multiply defined..." appear when using the Arm library in the Nuvoton machine learning examples, it will cause semihosting errors by deleting the repeatedly defined items directly and lead to the continued breakpoint appearing in the Keil project.

 

Note: In order to avoid the semihosting errors, apart from deleting duplicate definitions, users need to add the following code in retarget.c:

extern void $Super$$_sys_open(void);

FILEHANDLE $Sub$$_sys_open(const char *name, int openmode)

{

 return 1; /* everything goes to the same output */

}

(If there are other L6200E errors (Symbol _sys_XXX multiply defined) during compilation, please also add the FILEHANDLE definition of sys_XXXX())

Products:Microcontrollers ,Arm Cortex-M4 MCUs ,M451 Base Series ,M451M Series ,M452 USB Series ,M4521 USB Series ,M453 CAN Series ,M463 CAN FD/USB HS Series ,M467 Ethernet/Crypto Series ,M471 Series ,M479 Motor Control Series ,M481 Base Series ,M482 USB FS OTG Series ,M483 CAN Series ,M484 USB HS OTG Series ,M485 Crypto Series ,M487 Ethernet Series ,M4TK Touch Key Series ,NUC442/472 Series ,NUC472 Series ,NUC505 Series
Applications:
Function:Others,Software and Tools,Development-Environment,Keil