0

I'm trying to build the Contiki OS for a custom platform (based on the EZR32LG MCU) with GCC compiler. When I make the project it runs with a few warnings about '#pragma GCC diagnostic'. (I don't know if this is relevant, but I'm just providing the information to be complete)

After a few warnings, the compilation stops and returns:

/tmp/ccY4OiVd.s: Assembler messages:
/tmp/ccY4OiVd.s:37: Error: garbage following instruction -- `dsb 0xF'
/tmp/ccY4OiVd.s:51: Error: garbage following instruction -- `dsb 0xF'
make: *** [obj_slwstk6201a/watchdog.o] Error 1

I looked at the dsb instruction, but I'm not finding much except that this ensures that all explicit data memory transfer before the DSB are complete before any instruction after the DSB is executed.

Googling the error did not return many results, the only thing I found was that maybe my binutils version is outdated. I checked with ld --version, which returns 2.24. The latest release is 2.28, but I can't find a way to update the GCC version to use binutils 2.28.

So I downloaded GCC -v6, but the ld -v command still returns 2.24.

I'm not sure if this would resolve the error, or I'm completely wrong about the origin of the error..

boortmans
  • 1,138
  • 2
  • 24
  • 40
  • Did your reference mention whether `dsb` is supposed to take an argument? PS: the binutils package is separate from gcc. – Jester Mar 10 '17 at 16:17
  • I suspect you might be using a toolchain that target your build machine, instead of a toolchain that targets ARM Cortex-M3 cores. In the makefile, how is the compiler invoked? `$(CC)` only? There might be a prefix variable that indicate the target that you need to initialize. You most likely need to compile your code using `arm-none-eabi-gcc` or something similar. – rtur Mar 10 '17 at 16:26
  • @rtur I switched to the virtual machine with instant Contiki installed to make sure the right toolchain is used. I have an example project (EFM32) where I'm adapting from, which builds correctly.. – boortmans Mar 10 '17 at 18:13
  • @Jester the reference states that dsb van take 0xf as an argument to target the full system, if I remember correctly – boortmans Mar 10 '17 at 18:15

0 Answers0