Post Go back to editing

Question regarding building ADSP-CM40x Enablement Package libraries in IAR EWARM 8.22.2

I am trying to take a working IAR EWARM 7.8x project and import and build it in the new IAR EWARM 8.22.2.  Everything imported and built OK, but I am getting a (concerning) IAR warning about inconsistent wchar_t size with the Analog libraries (see link below for more info). 

https://www.iar.com/support/tech-notes/general/library-built-with-7.xx--causes-warning-message-in-8.11/

 

I believe this is because the ADSP-CM40x Enablement Package libraries were built with 7.x version.  However, I get compiler warnings when trying to rebuild the libdrv40z and libssl40z libraries…. And I get compiler errors when I rebuild the libosal40z_noos library.  I’ve included all of the build logs at the bottom of this email.  It looks like the errors just have to do with not being able to find files, but I don’t want to make updates to the project without verification from Analog Devices about the proper way to do this.

 

Do you have any recommendations on how (or if) we should be using the Analog libraries in IAR EWARM 8.xx???  Note, we are using the latest v2.1.0 ADSP-CM40x Enablement Package libraries and we are using the ADSP-CM408F-A device.  FYI, I did notice on importing the project in EWARM 8.22.2 that the Device (under General Options->Target->Device: AnalogDevices) got changed to the 409 device.  Also, I needed to recheck the “Use CMSIS” libraries (under IAR General Options->Library Configuration) in some cases.

 

Ideally, I would like an official ADSP-CM40x Enablement Package library version update (new release) that fully supports 8.xx (with updated IAR project files and pre-built library files).  Please let me know if you think this would be possible.

 

Thanks,

Jason

 

 

Example build warning in our application project:

 

Linking 

Warning[Lt009]: Inconsistent wchar_t size 

            adi_gpio.o(libssl40z.a) and 10 other objects in 6 different libraries have wchar_t size 16 bits 

            adi_initialize.o and 39 other objects, some of them in dl7M_tln.a and 15 other libraries have wchar_t size 32 bits 

 

Total number of errors: 0 

Total number of warnings: 1 

 

Building Analog Device Libraries below….

 

Building configuration: libdrv40z - Release 

Updating build tree... 

 

17  file(s) deleted. 

Updating build tree... 

adi_counter.c  

adi_adcc.c  

Warning[Pe177]: variable "eResult" was declared but never referenced C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\adcc\adi_adcc.c 1722 

Warning[Ta023]: Call to a non __ramfunc function (adi_osal_EnterCriticalRegion) from within a __ramfunc function C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\adcc\adi_adcc.c 2613 

Warning[Ta023]: Call to a non __ramfunc function (adi_osal_ExitCriticalRegion) from within a __ramfunc function C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\adcc\adi_adcc.c 2656 

Warning[Ta023]: Call to a non __ramfunc function (adi_osal_EnterCriticalRegion) from within a __ramfunc function C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\adcc\adi_adcc.c 3080 

Warning[Ta022]: Possible rom access (<ptr>) from within a __ramfunc function C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\adcc\adi_adcc.c 3109 

Warning[Ta023]: Call to a non __ramfunc function (adi_osal_ExitCriticalRegion) from within a __ramfunc function C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\adcc\adi_adcc.c 3121 

adi_crc.c  

adi_dacc.c  

adi_flash.c  

Warning[Pe177]: variable "nMaxBlock" was declared but never referenced C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\flash\adi_flash.c 353 

Warning[Pe177]: variable "nMaxBlock" was declared but never referenced C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\flash\adi_flash.c 493 

Warning[Ta022]: Possible rom access (<ptr>) from within a __ramfunc function C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\flash\adi_flash.c 1142 

Warning[Pe177]: function "write_reg" was declared but never referenced C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\flash\adi_flash.c 1667 

adi_hae.c  

adi_sinc.c  

adi_spi_bf6xx.c  

adi_sport_bf6xx.c  

adi_usbd_dev_bsp_musbmhdrc.c  

adi_uart_bf60x.c  

adi_twi.c  

Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\twi\adi_twi.c 1063 

Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\twi\adi_twi.c 1069 

Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\drivers\twi\adi_twi.c 1087 

adi_usbd_dev_common.c  

adi_usbd_dev_musbmhdrc_intrpt.c  

adi_usbd_dev_musbmhdrc_state.c  

adi_usbd_dev_musbmhdrc.c  

Building library 

Performing Post-Build Action 

 

Total number of errors: 0 

Total number of warnings: 13 

 

Building configuration: libssl40z - Release 

Updating build tree... 

 

11  file(s) deleted. 

Updating build tree... 

adi_gpio.c  

adi_nvic.c  

adi_cpt_v1.c  

adi_int_nvic.c  

adi_dma_bf60x.c  

adi_tru.c  

adi_pwm_bf6xx.c  

adi_tmr_bf6xx.c  

adi_pwr_bf60x.c  

adi_wd_bf6xx.c  

Warning[Pe188]: enumerated type mixed with another type C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\services\wd\adi_wd_bf6xx.c 230 

Warning[Pe188]: enumerated type mixed with another type C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src\services\wd\adi_wd_bf6xx.c 230 

Building library 

Performing Post-Build Action 

 

Total number of errors: 0 

Total number of warnings: 2 

 

 

Building configuration: libosal40z_noos - Release 

Updating build tree... 

 

0  file(s) deleted. 

Updating build tree... 

adi_osal_arch_c.c  

Fatal Error[Pe1696]: cannot open source file "osal_common.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Ports\adi_osal_arch_c.c 26 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\Ports\" 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_active.c  

adi_osal_noos.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_arch_int_table.c  

adi_osal_noos_critical.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_event.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_init.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_mutex.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_prof.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_rtl_lock.c  

adi_osal_noos_sem.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_thread.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_timing.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_arch_c.c  

Fatal Error[Pe1696]: cannot open source file "osal_common.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Ports\adi_osal_noos_arch_c.c 6 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\Ports\" 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

adi_osal_noos_tls.c  

Fatal Error[Pe1696]: cannot open source file "adi_osal_arch_internal.h" C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\libosal40z_noos\Source\osal_noos.h 28 

            searched: "C:\Repositories\ADSP-CM40x\CM403F_CM408F_EZ-KIT\ 

lib\iar\libosal40z_noos\..\..\..\inc\" 

            searched: "..\source\" 

            searched: "..\ports\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\Core\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\CMSIS\DSP\Include\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\" 

            searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\inc\c\" 

            current directory: "C:\Repositories\ADSP-CM40x\ 

CM403F_CM408F_EZ-KIT\lib\iar" 

Error while running C/C++ Compiler 

 

Total number of errors: 12 

Total number of warnings: 0