Author Topic: IAR EWARM v6.10  (Read 21351 times)

Offline jezc

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
IAR EWARM v6.10
« on: November 10, 2010, 11:16:48 AM »
Hi Mark,

I know it's just been released(!) but when do you think you will be able to offer support for IAR v6 for ARM platforms?

We've not yet set a date for moving to it, but looking at some of the features it offers (including the availability of Cortex-M4 processors from NXP & Freescale now) we'd certainly like to be able to work towards a date to aim for.

So, I guess I should also ask when you think you'll have Cortex-M4 board support? Even a rough date would help (e.g Jan 2011)

I understand that this may be a specialist request - maybe other users can comment on it if they are also after this support?

Cheers,
    JezC

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: IAR EWARM v6.10
« Reply #1 on: November 11, 2010, 12:19:08 PM »
Hi Jez

I didn't know that IAR had a V6.10 ready. Of course, this will be supported but I hope that it will not require a complete new setup [linker scripts and all, like V5 needed]. I haven't checked any details yet - maybe it can work with V5 input and then save a lot of work...

Presently there are projects for the Luminary (TI), NXP and ST Cortex M3s. Originally I thought that M3s were the best fit and so neither M0 nor M4 would be considered.
-rather than do anything with M0s (mainly for low power work) my feeling is that adding Energy Micro M3 support would be the way to go, since their M3 (and specially designed low power peripherals) seems to compete against the M0s with the advantages of still having M3...

As for the Freescale M4, I am considering making this an exception due to the fact that it combines some of the best features of Coldfires (which are the most popular processors for the project) with the M4 core - the M4 core itself is more or less an M3 with floating point support.

At the moment there are however no dates and I don't know about NXP M4s - the NXP M3s are nice but there are in fact very few users, meaning that the incentive to add more is not as high.

Regards

Mark

Offline jezc

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: IAR EWARM v6.10
« Reply #2 on: November 11, 2010, 11:15:49 PM »
Hi Mark,

I don't think it's such a big change as from v4 to v5 - the later v5 releases (5.506 for example) seem to have the many of the same features (though I mat have missed some of the subtler ones).

There's a bit more to the M4 than M3 + FPU (which is optional - the early Kinetis parts won't have the FPU - probably due very late 2011) - DSP-like instructions (barrel shifter, single cycle 32 bit multiply etc) and lots of subtle improvements to really boost the processing capabilities.

The NXP parts (LPC18xx will be M3-based, the LPC43xx M4-based) are going to offer pin-compatible versions & 43xx will include the FPU from the outset - there are also some very nice peripherals going in there (SPIFI to allow serial Flash to hold code but appear as linear memory, some very nice serial peripherals too and I think there's going to be USB2 high speed support with on-chip PHY too).

NXP peripherals are usually kept compatible, so the effort for the M4 over the M3 might be pretty small.

I'll check up on when the dev kits will be available (Freescale should have the k40 & k60 any day) & get back to you.

We're trying the LPC 1788 in place of the 2478 at the moment - will let you know how we get on with that as well.

Cheers,
    Jez

Offline JayWDavis

  • Newbie
  • *
  • Posts: 3
    • View Profile
Another IAR EWARM question
« Reply #3 on: January 14, 2011, 05:20:51 PM »
Hello;

I am using IAR EWARM v.6.x and new to micortasker.

I am trying to run a uTakser sample project with microtasker v1.4 sample application.
My target processor is the NXP LPC2103

(I am mainly intersested in I2c)


but getting this error

ielftool error: The string '__vector' was not found in the string table


Anybody experienced this or have insight for me?

thanks,
Jay Davis
« Last Edit: January 14, 2011, 05:25:04 PM by JayWDavis »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: IAR EWARM v6.10
« Reply #4 on: January 14, 2011, 09:30:33 PM »
Hi Jay

1) Open the IAR5 project
2) Add CstartupIAR5_LPC21XX.s to \Hardware\LPC23XX directory
3) Add flash_LPC21xx.icf to \uTaskerV1.4_LPC\Applications\uTaskerV1.4\IAR5_LPC23XX\settings directory
4) Add CstartupIAR5_LPC21XX.s to the IAR project by selecting the Hardware directory in IAR, right click and Add | Add files... Select the file and OK
5) Activate flash_LPC21xx.icf as linker script file in IAR by selecting the project and modifying the linker options - right click to open the dialog; select category "linker" and then modify the linker configuration file from $PROJ_DIR$\settings\flash_LPC23XX.icf to $PROJ_DIR$\settings\flash_LPC21xx.icf
6) Either remove the LPC23XX start-up file (CstartupIAR5.s) from the project or select it, right click and open its options and select "exclude from build"
7) In config.h activate #define LPC2103 and make sure that other LPC devices are deactivated
8 ) In config.h ensure that IIC_INTERFACE is active to test I2C interface, but make sure that SDCARD_SUPPORT and SUPPORT_GLCD are not enabled
9) Build the project (there is one warning since main can never return - this is normal)


I just checked the sequence using the IAR5 project in the last LPC2XXX release version using IAR6 and didn't get any errors. Check the steps carefully to see whether something was missed.

Regards

Mark

P.S. The IAR5 project doesn't include LPC21xx linker script or start-up files. These are attached in case anyone else wants to work with the LPC21xx family with IAR5 or IAR6

Offline JayWDavis

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: IAR EWARM v6.10
« Reply #5 on: January 15, 2011, 05:23:26 AM »
Mark;

I did the 9 steps you mentioned previously but still get the same error.   This time, I am also including the warnings with the error message,
in case that helps.

Thanks
Jay

CstartupIAR5_LPC21XX.s
Driver.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
GLCD.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
GlobalTimer.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
KeyScan.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
LCD.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
LPC23XX.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
Warning[Pe111]: statement is unreachable C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Hardware\LPC23XX\LPC23XX.c 311
MODBUS.c 
NetworkIndicator.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
TFT.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
Tty_drv.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
Watchdog.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
application.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
debug.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
eth_drv.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
iic_drv.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
low_power.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
mass_storage.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
modbus_app.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
uFile.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
uMalloc.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
uNetwork.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
uTasker.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
usb_application.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
webInterface.c 
Warning[Pe047]: incompatible redefinition of macro "_DEBUG_CODE_" C:\PEACE_RIVER\Apps_and_Dev_Tools\MicroTasker\uTaskerV1.4-4B_LPC2XXX\Applications\uTaskerV1.4\app_hw_lpc23xx.h 47
Linking
ielftool error: The string '__vector' was not found in the string table
Error while running Linker
 
Total number of errors: 2
Total number of warnings: 24

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: IAR EWARM v6.10
« Reply #6 on: January 15, 2011, 03:10:00 PM »
Jay

1) I notice that you are using the V1.4-4B version and not the release version. There is no problemen with this but I oriiginally tested with the release.
2) The target is set to debug in the V1.4-4B so I would set it back to release (the LPC2103 has very limited SRAm so a debug version from RAM is not very useful anyway).
3) The warnings about _DEBUG_CODE_ is due to the fact that the define is declared in 2 places; in the compiler pre-processor setting and in the file app_hw_lpc23xx.h. Generally the _DEBUG_CODE_ can be removed form the proprocessor setup but it doesn't affect the release build and is not actually a problem.
4) I did the same procedure with the V1.4-4B and it also builds normally. That is, I don't get any problem with the missing '__vector' string, whatever that is.
5) I tried making mistakes during the process but whatever I did wrong it wouldn't give me this error.
6) I then seached all projects to try to find a variable with this name but I couldn't; this variable doesn't exist in the project.
7) Then I searched the Internet and found the following: http://supp.iar.com/Support/?note=80474&from=note+40394
This seems to make it clear. I think that you have changed a target setting to the LPC2103 and then the linker is trying to calculate a checksum for the vectors table, where it uses the formular "IElfToolPostProcess=--checksum __vector+0x14:4,sum32:2;__vector-__vector+0x1f". It thus expects to find a symbol in the project, whereby __vector is in fact the value 0.
The simplest modification to ensure compatibility with IAR (how it works also changes a bit from one version to another) is to add the following to CstartupIAR5_LPC21XX.s:

Original:
        PUBLIC  resetVector       

        ARM
resetVector:
        LDR     pc, =reset               ; Reset


New:
        PUBLIC  resetVector
        PUBLIC  __vector       

        ARM
__vector:
resetVector:
        LDR     pc, =reset               ; Reset


This simply sets the value of __vector to be the same as resetVector (both are 0x00000000) and now the linker can generate its checksum.

Whether the checksum is of interest or not depends on how the code is loaded to the board (a target for SRAM never needs it). The checksum is inserted into the vector table so that the internal boot loader in the LPC2103 can verify that the loaded code is also valid [more details here: http://www.utasker.com/forum/index.php?topic=109.0].
If you are loading to the the board using FlashMagic this is also not needed since FlashMagic will calculate the value during the download and insert it automatically.
It is probably needed when loading to flash using the IAR loader.
As comparison, some projects simply put a fixed value at the reserved vector location since it is actually fixed for a particular start up file; eg. the GCC project simply puts the value 0xB8A06F88 there...

Therefore I expect that this will finally allow the project to operate correctly with your set up.

Regards

Mark



Offline JayWDavis

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: IAR EWARM v6.10
« Reply #7 on: January 17, 2011, 11:40:20 PM »
Many thanks again, Mark.

I will go over your info and see how it goes.


Jay