This post was last edited by cruelfox on 2019-6-4 21:35
I just downloaded and installed simplelink CC13x2 SDK 2.30 version, and decided not to use CCS for the time being, and just use the command line to solve the problem. Go to examples/nortos/CC1352P1_LAUNCHXL/drivers/pwmled2/gcc directory, and try it with the makefile inside.
); background-position:initial initial; background-repeat:initial initial; display:block; left:0px; top:-15px">
It seems that there is a problem with the path in the first line, and the imports.mak file cannot be found. So I edited it and changed it to use a relative path. By the way, take a look at what is in the imports.mak file
); background-position:initial initial; background-repeat:initial initial; display:block; left:0px; top:-15px">
It turned out to be some variable settings. I changed GCC_ARMCOMPILER to the path on my local machine.
Then make. Several obj are compiled (easy), but the link is wrong, such as:
e:/arm-2014q3/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: pwmled2.out uses VFP register arguments, e:/arm-2014q3/arm-none-eabi/lib\libc_s.a(lib_a-malloc.o) does not
This is a problem with the hardware floating point version of LIBC. Look at what is written in the makefile, and it is specified in LFFLAGS
"-L$(GCC_ARMCOMPILER)/arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard" \
"-L$(GCC_ARMCOMPILER)/arm-none-eabi/lib" \
These two lines may be the directory structure of the GCC tool chain brought by CCS, but it is not the same on my machine, so the problem is probably here. I saw that there were already -mthumb -mfloat-abi=hard parameters, so there was no need to specify the library file directory, so I deleted these two lines and the link was successful.
Use the nm tool to look at the symbol table of the ELF file and notice that
00002de0 T NOROM_ChipInfo_GetPackageType
00002df8 T NOROM_ChipInfo_GetChipFamily
00002e14 T NOROM_ChipInfo_GetChipType
00002e64 T NOROM_ChipInfo_GetHwRevision
00002ea8 T NOROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev1x_HaltIfViolated
It seems that the code generated by the SDK is now for chip Rev 1.x, so there should be no problem.
To program the board, you need a computer running Win7. I used SmartRF Flash Programmer 2 to download the ELF file I just compiled: pwmled2.out
Then, the two LEDs on the board light up and show the effect of breathing lights. PWM works, indicating that the compilation is normal .
This content is originally created by cruelfox , a user of EEWORLD forum. If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source