This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
resources:eval:user-guides:eval-ad5940:tools:keil_setup_guide [16 Jun 2019 09:41] – Dave A | resources:eval:user-guides:eval-ad5940:tools:keil_setup_guide [11 Aug 2022 14:42] – added reference to v5 compiler Hans Boot | ||
---|---|---|---|
Line 7: | Line 7: | ||
This will open up a form which must be filled out to download the software. Click Submit when complete to begin the download process. | This will open up a form which must be filled out to download the software. Click Submit when complete to begin the download process. | ||
- | Onve the software has downloaded an evaluation licence is required. Keil offers two different evaluation licences, time limited and size limited. Choose the size limited licence. This limits the allowable code size to 32kB. All the AD5940 example projects are within this limitation. | + | Once the software has downloaded an evaluation licence is required. Keil offers two different evaluation licences, time limited and size limited. Choose the size limited licence. This limits the allowable code size to 32kB. All the AD5940 example projects are within this limitation. |
+ | The latest versions of Keil use the ARM compiler v6, but the example code still uses v5, and refuses to compile under v6. Therefore, you will also need to download the legacy compiler, as shown in https:// | ||
===== How to edit and run example code in Keil===== | ===== How to edit and run example code in Keil===== | ||
To edit and run example code in Keil follow these steps: | To edit and run example code in Keil follow these steps: | ||
Line 17: | Line 18: | ||
</ | </ | ||
+ | // | ||
+ | |||
- Navigate to the **examples-> | - Navigate to the **examples-> | ||
- | - Double click on ADICUP3029.uvprojx file to open the project in Keil [The package at https:// | + | - Double click on ADICUP3029.uvprojx file to open the project in Keil [The package at https:// |
- The project structure is shown in the left hand side of the screen. It is divided into 4 sub sections: | - The project structure is shown in the left hand side of the screen. It is divided into 4 sub sections: | ||
- | * **AD5940Lib** - This conatins | + | * **AD5940Lib** - This contains |
* **Application** - This sub section contains the application code and main.c file. | * **Application** - This sub section contains the application code and main.c file. | ||
* **CMSIS** - This contains the arm CMSIS math library. | * **CMSIS** - This contains the arm CMSIS math library. | ||
Line 26: | Line 29: | ||
- Double click on AD5940_ADCPolling.c to open the file in the editor. | - Double click on AD5940_ADCPolling.c to open the file in the editor. | ||
- Modify code as required. | - Modify code as required. | ||
- | - To compile and build the project go to **Project-> | + | - To compile and build the project go to **Project-> |
+ | - If you see build errors like 'Fatal Error[Pe1696]: | ||
+ | * Click Menu > Project > Options > C/C++ Compiler > Preprocessor > Additional include directories (click on the three dots on the right) | ||
+ | * Click on '< | ||
+ | * Find the file on your computer and add it, e.g. navigate to (and then select): ' | ||
+ | * Click OK twice, then Menu > Project > Clean | ||
+ | * Click Menu > Project > Rebuild All | ||
- To download the code to the evaluation boards first ensure the boards are connected to the PC or laptop. Then click on the red icon in the toolbar to download the source code and begin the debugging session. {{ : | - To download the code to the evaluation boards first ensure the boards are connected to the PC or laptop. Then click on the red icon in the toolbar to download the source code and begin the debugging session. {{ : | ||
- To set breakpoints click to the left of the line of code. A red dot will appear as in below screenshot. | - To set breakpoints click to the left of the line of code. A red dot will appear as in below screenshot. | ||
- To begin executing press the " | - To begin executing press the " | ||
+ | - Hint: If downloading the code didn't work because of an error like this: ' | ||
+ | * Try this method instead: https:// | ||
+ | * If your board doesn' | ||