cancel
Showing results for 
Search instead for 
Did you mean: 

SPC5 studio project problems when compiling with -Os

davedave95
Associate III
Posted on February 09, 2017 at 17:10

When compiling a SPC5 studio generated demo program with -Os to optimize on size, the resulting code stalls during initialisation. in eirqInit() the loop

  while (eirqconf[i].eirqNumber != -1) {

never terminates when the eirqconf[] table has no entries except for the terminator record where irq is set to -1

  const eirq_config eirqconf[]={

    {-1,0,0,0,NULL}

  };

Is this a known issue, can anyone reproduce?

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
13 REPLIES 13
Erwan YVIN
ST Employee
Posted on February 14, 2017 at 14:37

Hello Giert ,

i will contact NXP-Freescale

The gcc source code are not available anymore

use some special attribute to disable compiler optimization.

__attribute__((optimize('-O0'))) 

Best regards
 
 Erwan

Posted on February 28, 2017 at 11:35

Hello Gert ,

i have tried this code on SPC560D

uint8_t bugmessage[] = 'Bug!!!

';
int8_t fs = -1;
void bug(void) {
 if (fs != -1) {
 sd_lld_write(&SD1, bugmessage,
 (uint16_t)(sizeof(bugmessage)/ sizeof(bugmessage[0])));
 }
 }�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

No bug happenned

Which SPC56 Family do you use ?

Best regards

Erwan

davedave95
Associate III
Posted on May 03, 2017 at 08:50

Hello Erwan,

Is there any news on this issue?

Do you know of any party offering a PPC VLC toolchain with commercial support?

Posted on May 04, 2017 at 09:55

Hello Gert ,

I have no news about that.

you can use hightec gcc

http://www.st.com/en/development-tools/spc5-htcomp-nltl.html

 

By SPC5Studio , you have 30 days free.

  Best Regards

                 Erwan