lpcware

Array - Debug error

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by masterboy on Fri Feb 08 05:42:55 MST 2013
Hi all,

I try a simple program with array:


#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif

#include <cr_section_macros.h>
#include <NXP/crp.h>

__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

[B]uint8_t pole[5];[/B]

int main(void) {

// TODO: insert code here

[B]pole = {1,2,3,4,5}; // [COLOR=Red][B]<- IS IT CORRECT?[/B][/COLOR][/B]

// Enter an infinite loop, just incrementing a counter
volatile static int i = 0 ;
while(1) {
i++ ;
}
return 0 ;
}


When I start DEBUG so it write me:

Quote:

make all
make: Nothing to be done for `all'.

13:33:47 Build Finished (took 468ms)

13:33:48 **** Incremental Build of configuration Debug for project test ****
make all
Building file: ../src/main.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2p00_LPC17xx -I"U:\LPCXpresso\CMSISv2p00_LPC17xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c"
[COLOR=Red]../src/main.c: In function 'main':
../src/main.c:33:9: error: expected expression before '{' token
make: *** [src/main.o] Error 1
[/COLOR]
13:33:49 Build Finished (took 968ms)



What do I do wrong? :(

Outcomes