Wiki

The most recent version of this page is a draft.DiffThis version (23 Aug 2017 15:14) was approved by Sumanth Karanth.

This is an old revision of the document!


IAR Board Support Package

A modular software framework is provided for quick application prototyping.

Please make sure you install IAR Embedded Workbench before installing the pack

The Cog software development kit consists of the below pack

  1. BSP - Board Support Package for EV-COG-AD3029LZ - This is a bare minimum pack required to enable working with ADuCM3029 on IAR. This helps to develop,
    • simple applications using the on-chip drivers.
    • simple applications using the on-board drivers.
The application examples found in the pack are developed for EVAL-ADuCM3029-Ez-Kit and will require small changes to make it work for EV-COG-AD3029LZ

As an example “LED_button_callback” is considered and the changes required is briefly explained.

  1. Install the IAR BSP from the above link.
  2. Open the “LED_button_callback.c” source code in the editor of your choice and make the below changes:
  • PATH: C:\Analog Devices\ADuCM302x\ADuCM302x_EZ_Kit\examples\gpio\LED_button_callback\LED_button_callback.c
  • Macro definition changes under “defined(ADUCM302x)”:
  • #define PB1_PORT_NUM ADI_GPIO_PORT1
  • #define PB1_PIN_NUM ADI_GPIO_PIN_0
  • #define PB2_PORT_NUM ADI_GPIO_PORT0
  • #define PB2_PIN_NUM ADI_GPIO_PIN_9
  • #define LED1_PORT_NUM ADI_GPIO_PORT2
  • #define LED1_PIN_NUM ADI_GPIO_PIN_2
  • #define LED2_PORT_NUM ADI_GPIO_PORT2
  • #define LED2_PIN_NUM ADI_GPIO_PIN_10
  • Application code changes:
  • Before changes:
  • /* set GPIO output LED 4 and 5 */
  • if(ADI_GPIO_SUCCESS != (eResult = adi_gpio_OutputEnable(ADI_GPIO_PORT1, (ADI_GPIO_PIN_12 | ADI_GPIO_PIN_13), true)))
  • {
  • DEBUG_MESSAGE(“adi_gpio_SetDirection failed\n”);
  • break;
  • }
  • ………..
  • After changes:
  • /* set GPIO output LED 4 and 5 */
  • if(ADI_GPIO_SUCCESS != (eResult = adi_gpio_OutputEnable(LED1_PORT_NUM , LED1_PIN_NUM, true)))
  • {
  • DEBUG_MESSAGE(“adi_gpio_SetDirection failed\n”);
  • break;
  • }
  • if(ADI_GPIO_SUCCESS != (eResult = adi_gpio_OutputEnable(LED2_PORT_NUM, LED2_PIN_NUM , true)))
  • {
  • DEBUG_MESSAGE(“adi_gpio_SetDirection failed\n”);
  • break;
  • }
  • ………..
  • save the changes and close the source file.
  1. Now open the application in IAR embedded workbench.

PATH:C:\AnalogDevices\ADuCM302x\ADuCM302x_EZ_Kit\examples\gpio\LED_button_callback\ADuCM302x\iar\LED_button_callback.eww

  1. Press Alt+F7 to open the project options.
  2. Under category select Debugger.
  • In setup, under Driver select CMSIS DAP.
  • In Download, uncheck the verify download option.
  1. Under category select CMSIS DAP.
  • In Interface, under Interface select SWD.
  1. Press “OK” to save and close the options window.
  2. Press Cltr+D to initiate download and debug.
/srv/wiki.analog.com/data/pages/resources/eval/user-guides/ev-cog-ad3029lz/packs_bsp/iar_support.txt · Last modified: 23 Aug 2017 15:34 by Sumanth Karanth