This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CYPRESS FM4 BOARD AND FM4 STARTER KIT error in program

Hello there,

I am a newbie in embedded systems, Currently I am using ARM-based Digital Signal Processing Lab-in-a-Box with Cypress FM4 board (FME-176L-S6E2CC-ETH Starter Kit) . Program is -

// loop_intr.c

#include "audio.h"

volatile int16_t audio_chR=0; //16 bits audio data channel right
volatile int16_t audio_chL=0; //16 bits audio data channel left

void I2S_HANDLER(void) { /****** I2S Interruption Handler *****/

gpio_toggle(TEST_PIN);

audio_IN = i2s_rx();
audio_chL = (audio_IN & 0x0000FFFF); //Separate 16 bits channel left
audio_chR = ((audio_IN >>16)& 0x0000FFFF); //Separate 16 bits channel right

//Process

audio_OUT = ((audio_chR<<16 & 0xFFFF0000)) + (audio_chL & 0x0000FFFF); //Put the two channels toguether again
i2s_tx(audio_OUT);

}

int main(void)
{
gpio_set_mode(TEST_PIN,Output);
audio_init ( hz48000, mic_in, intr, I2S_HANDLER);

while(1){}
}

When I try to built the target  It shows following output in Build out put window

Build started: Project: DSP_LiB
*** Using Compiler 'V6.19', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'S6E2CC'
drivers/delay.c(27): error: expected '(' after 'asm'
__asm void delay_cycles(unsigned int cycles) ;{
^
drivers/delay.c(27): error: expected ';' after top-level asm block
__asm void delay_cycles(unsigned int cycles) ;{
^
;
drivers/delay.c(27): error: expected identifier or '('
__asm void delay_cycles(unsigned int cycles) ;{
^
3 errors generated.
compiling delay.c...
C:/Users/anadaf/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/DSP/Source/FilteringFunctions/FilteringFunctionsF16.c(36): warning: In file included from...
C:/Users/anadaf/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/DSP/Source/FilteringFunctions/arm_levinson_durbin_f16.c(228): warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
for(int p=1; p < nbCoefs; p++)
^
C:/Users/anadaf/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/DSP/Source/FilteringFunctions/arm_levinson_durbin_f16.c(235): warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
for(int i=0; i < p; i++)
^
C:/Users/anadaf/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/DSP/Source/FilteringFunctions/arm_levinson_durbin_f16.c(246): warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
for(int i =0;i < nb ; i++)
^
C:/Users/anadaf/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/DSP/Source/FilteringFunctions/arm_levinson_durbin_f16.c(246): error: redefinition of 'i'
for(int i =0;i < nb ; i++)
^
C:/Users/anadaf/AppData/Local/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/DSP/Source/FilteringFunctions/arm_levinson_durbin_f16.c(235): note: previous definition is here
for(int i=0; i < p; i++)
^
3 warnings and 1 error generated.
compiling FilteringFunctionsF16.c...
".\obj\DSP_LiB.axf" - 4 Error(s), 3 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01

Please help me out.