Help needed for lecture 7

This forum is for teachers wanting to make use of the course materials "Understanding Radio Communications - using SDRs" Initially moderated by course authors Paolo and Lorenzo, it is the place to ask questions about the materials and learn from the experiences of these and other teachers.
Post Reply
WarrenZiegler
Posts: 1
Joined: Fri Mar 19, 2021 4:11 pm

Help needed for lecture 7

Post: # 34Post WarrenZiegler »

Please can you help with compiling the Arduino code for Lesson 7.

I get the following error message on all:
Arduino: 1.8.14 Hourly Build 2021/03/09 09:33 (Windows 10), Board: "XinaBox CW01, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 26 MHz, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

CC1101.cpp:99:67: error: section attribute not allowed for 'data'

static void write_burst_pgm(uint8_t addr, uint8_t const * PROGMEM data, uint8_t len)

Best regards - Warren Z, University Southern Maine
Lorenzo.Frezza
Posts: 4
Joined: Wed Nov 04, 2020 5:31 pm

Re: Help needed for lecture 7

Post: # 38Post Lorenzo.Frezza »

As discussed with Mr Warren via email, this was caused by a wrong setting of the Arduino IDE, which was compiling the code for the XinaBox CW01 instead of an Arduino Uno, giving this error. The problem was solved by choosing the correct hardware.

Other users might have the same issue if they are compiling the code to work on other hardware, for which the PROGMEM keyword does not work. In this particular instance, since the registry data for the CC1101 takes up a lot of memory, they are written to the program memory instead of the RAM. The keyword PROGMEM is there to indicate this fact, but it is Arduino-specific and other microcontrollers might handle it differently.
In these cases, try to remove the PROGMEM keyword from lines 16, 34, 43 and 99 of CC1101.cpp


Lorenzo
Post Reply