We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Newbie here. Trying to write a program after a very long hiatus. I'm just past installing software and may not have Keil 5 installed correctly. After a build, I get two errors, one of which is :
C:/Users/Binky/AppData/Local/Arm/Packs/ARM/CMSIS-DSP/1.14.4/Source/DistanceFunctions/arm_dtw_distance_f32.c(123): error: redefinition of 'q' for(uint32_t q = 1; q < queryLength; q++)
Any ideas ?
Here is my code:
#include "TM4C123GH6PM.h" int main(void) { unsigned int value; SYSCTL->RCGCGPIO |= 0X20; /* enable clock to gpio f */ GPIOF->DIR = 0X08; /* set PORTF pin as output led pin */ /* and PORTF4 as input, SW1 is on PORTF4*/ GPIOF->DEN = 0x18; /* set portf pins 4-3 as digital pins */ GPIOF->PUR = 0x10; /* enable pull up for pin 4 */ while(1) { value = GPIOF->DATA; /*read data from portf */ value = ~value; value = value >>1; GPIO->DATA = value; } } void SystemInit(void) /* Some sort of coprocessor access to do with floating points */ { SCB->CPACR |= 0x00F00000; }
This is likely project setup issues. Do you need CMSIS-DSP (where this source is from) in your project?
Open Project > Manage > Runtime Environment, and deselect CMSIS > DSP.