Hallo everyone ,
I hope that any one helped me in the following issue
I am working now with NuMaker-PFM-2351 but after that I’ll use a custom board based on it so I follow the steps in Using Mbed OS on a custom board Porting a custom board - Porting | Mbed OS 5 Documentation
but there’s problem in linking with cmse_lib.o an give me the following error
Error: L6218E: Undefined symbol flash_erase_sector (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_free (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_get_erase_value (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_get_page_size (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_get_sector_size (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_get_size (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_get_start_address (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_init (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol flash_program_page (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/drivers/source/FlashIAP.o).
Error: L6218E: Undefined symbol TZ_LoadContext_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M23/irq_armv8mbl.o).
Error: L6218E: Undefined symbol TZ_StoreContext_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M23/irq_armv8mbl.o).
Error: L6218E: Undefined symbol TZ_InitContextSystem_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_kernel.o).
Error: L6218E: Undefined symbol TZ_AllocModuleContext_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_thread.o).
Error: L6218E: Undefined symbol TZ_FreeModuleContext_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/rtos/source/TARGET_CORTEX/rtx5/RTX/Source/rtx_thread.o).
Error: L6218E: Undefined symbol CLK_DisableModuleClock_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/targets/TARGET_NUVOTON/TARGET_M2351/analogin_api.o).
Error: L6218E: Undefined symbol CLK_EnableModuleClock_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/targets/TARGET_NUVOTON/TARGET_M2351/analogin_api.o).
Error: L6218E: Undefined symbol CLK_SetModuleClock_S (referred from BUILD/IMAGINARYBOARD_NPSA_NS/ARMC6/mbed-os/targets/TARGET_NUVOTON/TARGET_M2351/analogin_api.o).
…
I checked and found that cmse_lib.o not maped in tha .mape file
and here is the custom_targets.json file
{
"IMAGINARYBOARD_NPSA_NS": {
"inherits": ["NU_PFM_M2351"],
"detect_code": ["1234"],
"core": "Cortex-M23-NS",
"trustzone": false,
"extra_labels_add": [
"M23_NS",
"NU_PREBUILD_SECURE"
],
"macros_add": [
"MBED_TZ_DEFAULT_ACCESS=1"
],
"components_add": ["FLASHIAP"],
"post_binary_hook": {"function": "M2351Code.merge_secure"},
"secure_image_filename": "mbed-os-imaginary-port-2351.hex",
"mbed_rom_start" : "0x10040000",
"mbed_rom_size" : "0x40000",
"mbed_ram_start" : "0x30008000",
"mbed_ram_size" : "0x10000"
},
“IMAGINARYBOARD_NPSA_S”: {
"inherits": ["NU_PFM_M2351"],
"core": "Cortex-M23",
"trustzone": true,
"extra_labels_add": [
"M23_S"
],
"components_add": ["FLASHIAP"],
"deliver_to_target": "IMAGINARYBOARD_NPSA_NS",
"delivery_dir": "TARGET_IMAGINARYBOARD",
"mbed_rom_start" : "0x0",
"mbed_rom_size" : "0x40000",
"mbed_ram_start" : "0x20000000",
"mbed_ram_size" : "0x8000"
}
}
I’ll be appreciated if any one help me in that