This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-EM-CC2340R5: SimpleLink Examples CC2340R5 Building Issue with project on IAR

Part Number: LP-EM-CC2340R5
Other Parts Discussed in Thread: CC2340R5, SYSCONFIG

Hi All,

I am using the latest Simplelink_lowPower_f3_sdk_7_20_00_29 from TI and trying to get some examples to build using IAR 9.40.1 Embedded Workbench.

I've followed all the help I can find setting up environment variables etc. 

But I have two ongoing issues:

Clicking on the .sysconfig file, whilst it does start to open sysconfig via IAR, there is always a Loading Error which seems to be looking for a folder CC2340R5. I can't find any documentation
relating to this folder / its use or when / how its created.

Also if SysConfig tool is open - and I try to Browse and Existing Design - it doesn't seem to like the IAR Examples .syscfg, complaining Cannot Specify --board without --product.

Finally - I've tried manually creating a new .sysconfig with LED GPIO setup, this does create the ti_drivers_config.c / .h but building still fails.

See attached images of errors.

/resized-image/__size/320x240/__key/communityserver-discussions-components-files/538/New-Sysconfig.png

/resized-image/__size/320x240/__key/communityserver-discussions-components-files/538/OpeningBlinky-SysConfig.png

/resized-image/__size/320x240/__key/communityserver-discussions-components-files/538/BulidError_5F00_Blinky.png

Any ideas if these examples are defined to work within IAR? Or what I might be doing wrong?

  • Hi Robert,

    Here is the Quick Start Guide for SimpleLink CC23xx SDK, including Introduction to the SimpleLink Low Power F3 SDK for instructions concerning downloading IAR and TI BLE5-Stack Quick Start to guide developers on importing and building SimpleLink F3 SDK projects.  You should also make sure that your FreeRTOS is installed in a valid location: https://e2e.ti.com/f/1/t/1229125 

    I am not able to see the images clearly, they seem to be a reduced size or have been compressed.  I am aware that the SysConfig editor is not available for IAR EW solutions and thus you will need to use the SysConfig standalone GUI or edit the *.syscfg file directly with a text editor.  I am able to confirm that default SimpleLink F3 v7.20 SDK examples build as expected with IAR EWARM v9.40 and the correct dependencies in place.

    Regards,
    Ryan

  • hi Ryan,

    Thanks for your reply. At least this should work - somehow.

    So one thing I've discovered so far relating to the .syscfg viewer running within IAR. My test project was in a temp folder with the naming 'Rob Test 001' - with spaces in the folder name. This was causing the issue with SysConfig tool opening up the mcuboot_blinky.syscfg.

    Seem like spaces in the folder names is not allowed.

    The issue I am really stuck with now is the 'Custom Build' command line which I think should run SysConfig tool and create the necessary output file 'SysConfig_Generated_Files.ipcf" doesn't seem to work.

    Can you confirm if it is correct that this file should generated by the SysConfig tool. Looking at the command line options for SysConfig, it seems it would need the option --lpcf to achieve this - but I cannot see this anywhere being used. 

    Still struggling with this and been through the setup twice.

    Note, if I exclude 'mcuboot_blink.syscfg' from the build process and copy in 'SysConfig_Generated_Files.ipcf" from the example the soruce files start to complile.

    SysConfig_Generated_Files.ipcf
    rebuilding 'build_ide.ninja': cannot make progress due to previous errors
    cd C:\ti\Robs_Test_001 && c:/ti/sysconfig_1.17.0/nw/nw.exe c:/ti/sysconfig_1.17.0/dist/cli.js -o C:\ti\Robs_Test_001 -s “c:/ti/simplelink_lowpower_f3_sdk_7_20_00_29/.metadata/product.json” –compiler iar C:\ti\Robs_Test_001\mcuboot_blinky.syscfg --ipcf "Test.ipcf"
    FAILED: C:/ti/Robs_Test_001/SysConfig_Generated_Files.ipcf
    cmd /C cd C:\ti\Robs_Test_001 && c:/ti/sysconfig_1.17.0/nw/nw.exe c:/ti/sysconfig_1.17.0/dist/cli.js -o C:\ti\Robs_Test_001 -s “c:/ti/simplelink_lowpower_f3_sdk_7_20_00_29/.metadata/product.json” –compiler iar C:\ti\Robs_Test_001\mcuboot_blinky.syscfg --ipcf "Test.ipcf"

    Total number of errors: 2
    Total number of warnings: 0
    Resolving dependencies...
    Build failed

  • okay, a bit more discovery from my end.

    I can now build the project if I exclude 'mcuboot_blinky.syscfg" from the build.

    Its seems that when pre-bulid option for .syscfg files is used, this deletes 'SysConfig_Generated_Files.ipcf" but does not recreate it.

    I've notice the creation of this file only occurs when the SysConfig tool is used, and then File->Save is performed.

    So I am wondering if the expectation is that this file can be created with the pre-build within IAR or actually excluding the .syscfg from the build is the preferred mehtod for IAR projects. Perhaps its a problem with the custom build command:

    $SYSCONFIG_ROOT$/nw/nw.exe $SYSCONFIG_ROOT$/dist/cli.js -o $PROJ_DIR$ -s “$COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR$/.metadata/product.json” –compiler iar $FILE_PATH$"

    for files with extension .syscfg

    Any comments?

    Regards


    Rob

  • You should be able to build the mcuboot_blinky default project without any modifications.  Here is my Build log:

    	mcuboot_blinky_LP_EM_CC2340R5_nortos_iar - Debug			
    	Reading project nodes...			
    				
    	SysConfig_Generated_Files.ipcf			
    	Bootstrapping build file...			
    				
    	ti_devices_config.c			
    	main_nortos.c			
    	ti_drivers_config.c			
    	blinky.c			
    	mcuboot_blinky_LP_EM_CC2340R5_nortos_iar.out			
    	.postbuild			
    				
    				
    	C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace>ielftool.exe --bin "C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace\Debug\Exe\mcuboot_blinky_LP_EM_CC2340R5_nortos_iar.out" "C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace\Debug\Exe\mcuboot_blinky_LP_EM_CC2340R5_nortos_iar-noheader.bin" 			
    				
    	   IAR ELF Tool V10.14.1.1470			
    	   Copyright 2007-2023 IAR Systems AB.			
    				
    	Loading C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace\Debug\Exe\mcuboot_blinky_LP_EM_CC2340R5_nortos_iar.out			
    	Saving binary file to C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace\Debug\Exe\mcuboot_blinky_LP_EM_CC2340R5_nortos_iar-noheader.bin			
    				
    	C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace>c:/ti/simplelink_lowpower_f3_sdk_7_20_00_29/tools/common/mcuboot/imgtool sign --header-size 0x80 --align 4 --slot-size 0x3D000 --version 1.0.0 --pad-header --pad --key c:/ti/simplelink_lowpower_f3_sdk_7_20_00_29/source/third_party/mcuboot/root-ec-p256.pem "C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace\Debug\Exe\mcuboot_blinky_LP_EM_CC2340R5_nortos_iar-noheader.bin" "C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace\Debug\Exe\mcuboot_blinky_LP_EM_CC2340R5_nortos_iar.bin" 			
    				
    	C:\ti\simplelink_lowpower_f3_sdk_7_20_00_29\IAR_workspace>if "" == "" goto end 			
    				
    	Total number of errors: 0			
    	Total number of warnings: 0			
    	Resolving dependencies...			
    	Build succeeded			
    

    The Custom Build Command line is $SYSCONFIG_ROOT$/sysconfig_cli.bat -o $PROJ_DIR$ -s "$COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR$/.metadata/product.json" -s "$COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR$/.metadata/product.json" --compiler iar $FILE_PATH$ 

    Both mcuboot_blinky.syscfg and SysConfig_Generated_Files.ipcf are available in the project workspace.  You can contact IAR for further questions regarding their IDE operation such as directory naming expectations and build line commands.

    Regards,
    Ryan

  • Hi Ryan,

    I have progressed to the stage of building okay now. Thanks to some of your points and support I have ongoing with IAR.

    I am now stuck trying to flash and debug this on the LP_EM_CC2340R5.

    I am trying to get my head around the CCFG bootloader stuff. Wondering if I may have erased the built in one and actually how this even work. Does the CC2340R5 flash get written directly, does it use the LP_EM_CC2340R5 external SPI Flash.

    Any pointers would help. Been up and down documentation all day and still not getting anyware.

    Also. The devices on our 2 eval board are Rev A - i've seen posts elsewhere saying these shouldn't be used?

    Device marking:

    CC2340
    R52
    TIXIC8 A
    AGEV G4

  • Hi Robert,

    You cannot use Rev A CC2340R5 devices with the released SIMPLELINK-LOWPOWER-F3-SDK.  If your Device Info reads as Rev A on Uniflash then you will need to obtain new silicon immediately

    Regards,
    Ryan