In my XMega128A1 project I just crossed the 65535 byte boundry, now my
power up CRC fails.

>From the error that I'm getting, below, I belive that __data_load_end
is only 16 bits wide?

What magic linker fu do I need to change it to 32 bits, in avrxmega7.x
(that I've already customized)?

Should I file a bug report about this in the tracker?

/*
 * LOADADDR(section):Return the absolute LMA of the named section. This
 * is normally the same as ADDR, but it may be different if the AT
 * attribute is used in the output section definition.
*/
   __data_load_start = LOADADDR(.data);
   __data_load_end = __data_load_start + SIZEOF(.data);
   __data_noinit_start = LOADADDR(.noinit);
   __data_noinit_end = __data_noinit_start + SIZEOF(.noinit);


#if( USE_CRC_FLASH_CHECK > 0 )
extern uint16_t __data_load_end[1]; /* Defined by the linker script.
Set to address of last byte of .text+.data section */
#include <util/crc16.h>
static __inline__ uint16_t crc_flash_check_has_error( void );
static __inline__ uint16_t crc_flash_check_has_error( void )
{
  uint8_t  byte_u8;
  uint16_t crc_u16, i;
  uint16_t flash_end_u16 = (uint16_t) &(__data_load_end[0]);
...

Changing from uint16_t to uint32_t in all the correct places results
in "cast of pointer to integer of different size".

_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to