This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf51822 bootloader with gcc

while creating a Makefile for DFU, for BLE DualBank only, I'm getting some odd errors:

../bootloader_util_arm.c:19:1: error: 'at' attribute directive ignored [-Werror=attributes] ../bootloader_util_arm.c:20:1: error: 'at' attribute directive ignored [-Werror=attributes] ../bootloader_util_arm.c:23:7: error: expected '(' before 'void' ../bootloader_util_arm.c:27:5: error: stray '#' in program

anyone hit the same issue?

also, is there any way to omit ASM and use plain C?

Thanks! OL

Parents
  • This probably comes from the use of the Keil specific attribute at() to place the start address of the bootloader, and to reserve flash space for the bootloader settings, and the difference in Keil and GCC's ASM syntax.

    There is unfortunately not any direct equivalent for the at keyword with GCC, but you can achieve this by using the section keyword and make changes to the linker script. You can take a look at this answer on Stack Overflow for details. With regard to the ASM syntax, you'll just have to change it manually.

Reply
  • This probably comes from the use of the Keil specific attribute at() to place the start address of the bootloader, and to reserve flash space for the bootloader settings, and the difference in Keil and GCC's ASM syntax.

    There is unfortunately not any direct equivalent for the at keyword with GCC, but you can achieve this by using the section keyword and make changes to the linker script. You can take a look at this answer on Stack Overflow for details. With regard to the ASM syntax, you'll just have to change it manually.

Children
Related