Building firmware for CW305

Hello. I am trying to build the SAM3U firmware for the CW305 target using the instructions in I have got the latest code uploaded to Github. I have seen the discussion in post, but it seems it does not apply to newer versions of the firmware.

I am getting an error complaining that it cannot find some of the library files

"arm-none-eabi-gcc"    -c -o ../src/ASF/sam/boards/cw305/init.o ../src/ASF/sam/boards/cw305/init.c
../src/ASF/sam/boards/cw305/init.c:44:10: fatal error: compiler.h: No such file or directory
   44 | #include "compiler.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [<integrado>: ../src/ASF/sam/boards/cw305/init.o] Error 1

This happens when building in Linux (arm-none-eabi-gcc) and Windows (Microchip Studio, uncommenting the Windows lines in the Makefile). The header filecompiler.h does exist in its own directory. I am using the Makefile in hardware/victims/cw305_artixtarget/fw/sam3u/CW305_SAM3U_FW/build as per the instructions, not the one in hardware/victims/cw305_artixtarget/fw/sam3u/CW305_SAM3U_FW/src, although that one seems to build fine.

Is this a known error? Do you know if other environment variables are expected to be set, apart from what is in the build instructions and the Makefile or any other way to fix this?

Thank you very much in advance for your help.

The makefile in hardware/victims/cw305_artixtarget/fw/sam3u/CW305_SAM3U_FW/src is the correct one. Thanks for bringing that to my attention, I’ll get that documentation fixed up.


1 Like

Thank you very much! We will use that file.