3378 views|2 replies

1370

Posts

2

Resources
The OP
 

[CC1352P Evaluation] Continue to tinker with SDK examples [Copy link]

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

This post is from RF/Wirelessly
 

1370

Posts

2

Resources
2
 

Note the LDFLAGS in this makefile

LFLAGS = -Wl,-T,../gcc/CC1352P1_LAUNCHXL_NoRTOS.lds \
    "-Wl,-Map,$(NAME).map" \
    "-L$(SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR)/source" \
    -l:ti/display/lib/display.am4fg \
    -l:ti/grlib/lib/gcc/m4f/grlib.a \
    -l:third_party/spiffs/lib/gcc/m4f/spiffs_cc26xx.a \
    -l:ti/drivers/rf/lib/rf_multiMode_cc13x2_v1.am4fg \
    -l:ti/drivers/lib/drivers_cc13x2_v1.am4fg \
    -eresetISR \
    "-L$(SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR)/kernel/nortos" \
    -l:lib/nortos_cc13x2_v1.am4fg \
    -l:ti/devices/cc13x2_cc26x2_v1/driverlib/bin/gcc/driverlib.lib \
    -march=armv7e-m \
    -mthumb \
    -mfloat-abi=hard \
    -mfpu=fpv4-sp-d16 \

I used a lot of -l parameters to specify library files. During the make process, there was no process of compiling the library. I checked the source/ti directory of the SDK and found that these files had been released with the SDK, that is, the SDK provides source code and compiled libraries. By default, the binary library provided by TI is used to compile the project. This is different from the STM32 software development I am familiar with, where each project references the library file from the source code.

This post is from RF/Wirelessly
 
 

1370

Posts

2

Resources
3
 

In the same way (with a minor modification to the makefile), I successfully compiled the two projects of nortos, rfEasylinkRx and rfEasyllinkTx. I downloaded them to the two boards respectively, and saw them communicating (the LED flashed when the RX program received the data packet sent by the TX program).

This post is from RF/Wirelessly
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list