Help with extra asm section in trampoline

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I have a unique bootloader that has a GUI and offers up several flash bin images to install and run.  The bin images have the trampoline that gets trimmed off when installed.  That part works OK.  The bootloader has some empty space at the end, that I want to put some permanent crypto code into, that is accessed from both bootloader and regular program. 

 

The regular program therefore needs to link a section below the program_start_address.  The trouble is my asm skills are not good enough.   How to do this below please?

 

 

***********

 

 

// trampoline_uc3.S

  // This must be linked @ 0x80000000 if it is to be run upon reset.
  .section  .reset, "ax", @progbits

  .global _trampoline
  .type _trampoline, @function
_trampoline:
  // Jump to program start.
  rjmp    program_start
 

<<  insert section here at 24K >>

  .org  PROGRAM_START_OFFSET   //  32K
program_start:
  // Jump to the C runtime startup routine.
  lda.w   pc, _stext

 

Last Edited: Sat. Jul 4, 2015 - 09:41 AM