• AVR Freaks

AnsweredHot!How to convert #pragma config's

Page: < 12 Showing page 2 of 2
Author
LdB_ECM
Super Member
  • Total Posts : 434
  • Reward points : 0
  • Joined: 2019/04/16 22:01:25
  • Location: 0
  • Status: offline
Re: How to convert #pragma config's 2020/07/20 20:21:39 (permalink) ☼ Best Answerby JakeSays 2020/07/21 05:16:36
+1 (1)
jakeSys you can just add the bytes into the elf or bin using the standard objcopy executable in the binary directory along with the compiler, linker etc. You just create a file with the binary entries and add the call to your makefile.
 
using the values above and a binary file config.bin with the values you want
arm-none-eabi-objcopy.exe --add-section .configdata=config.bin --set-section-flags .configdata=load,alloc  --change-section-address .configdata=0x08004000 original_file.elf new_file.elf

post edited by LdB_ECM - 2020/07/20 20:29:09
#21
JakeSays
New Member
  • Total Posts : 19
  • Reward points : 0
  • Joined: 2020/03/28 03:32:15
  • Location: 0
  • Status: offline
Re: How to convert #pragma config's 2020/07/21 05:19:30 (permalink)
0
@LdB_ECM - excellent - that's perfect as I already have an objcopy step in my build. I'll just modify it with your suggestion.
#22
Page: < 12 Showing page 2 of 2
Jump to:
© 2020 APG vNext Commercial Version 4.5