Kinsey Moore commented on a discussion on bsps/riscv/esp32/start/bspstart.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1160#note_147702

 > +  bsp_interrupt_initialize();
 > +}
 > +
 > +/* src is the offset in flash */
 > +BSP_START_TEXT_SECTION static inline void
 > +copy_from_flash_offset(void *dest, const void *src, size_t n)
 > +{
 > +  /* The RAM load sections are offset from 0x0, offset from mapped flash 
 > base */
 > +  uintptr_t flash_base = 0x3c000000;
 > +
 > +  uintptr_t flash_address = ((uintptr_t)src);
 > +  flash_address += flash_base;
 > +  memcpy(dest, (void *)flash_address, n);
 > +}
 > +
 > +BSP_START_TEXT_SECTION void bsp_start_copy_sections( void )

It's somewhat generic, but most BSPs won't need this (and haven't until now). 
If I move this into a shared area, then I need to also define an interface for 
the copy functions that any implementer needs to define.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1160#note_147702
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to