Recently on a medium sized project (ie, a lot of stuff works already), a problem has recently cropped up where it seems like adding a constant anywhere in the program causes the auto_init() function to never exit; and so the software never runs.
If I remove the constant declarations, the problem disappears. Since the code that I changed does not actually get executed, it seems to be a memory issue. I'm not sure past that what could cause it.
Has anyone seen this issue before? Is it caused by a known bug?
Below is the cmd file associated with the project. Any assistance is appreciated.
-c
-stack 0x2000 /* PRIMARY STACK SIZE */
-sysstack 0x2000 /* SECONDARY STACK SIZE */
-heap 0x1000 /* HEAP AREA SIZE */
/*_RTDX_interrupt_mask = ~0x06000010; */
/* Set entry point to Reset vector */
/* - Allows Reset ISR to force IVPD/IVPH to point to vector table. */
/*-e reset_isr */
MEMORY
{
MMR (RW) : origin = 0000000h length = 0000c0h /* MMRs */
DARAM (RW) : origin = 00000c0h length = 00ff40h /* on-chip DARAM */
SARAM (RW) : origin = 0030000h length = 01e000h /* on-chip SARAM */
SAROM_0 (RX) : origin = 0fe0000h length = 008000h /* on-chip ROM 0 */
SAROM_1 (RX) : origin = 0fe8000h length = 008000h /* on-chip ROM 1 */
SAROM_2 (RX) : origin = 0ff0000h length = 008000h /* on-chip ROM 2 */
SAROM_3 (RX) : origin = 0ff8000h length = 008000h /* on-chip ROM 3 */
}
SECTIONS
{
vectors (NOLOAD)
.bss : > DARAM , fill = 0
vector : > DARAM ALIGN = 256
.stack : > DARAM
.sysstack : > DARAM
.sysmem : > DARAM
.text : > SARAM
.dbuffer : > DARAM
.data : > DARAM
.cinit : > DARAM
.const : > DARAM, fill = 0
.cio : > DARAM, fill = 0
.usect : > DARAM
.switch : > DARAM
}