This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NXP LPC17xx USB Bootloader

Hi people!

I'm using the keil MDK 4.11 and can't compile the USB bootloader for lpc17xx. I receive a lot of the errors like this: "memory.c(14): error: #5: cannot open source input file "LPC17xx.h": No such file or directory"

Link for the bootloader: ics.nxp.com/.../an10866.zip

What I should do to resolve my problem?

Is the first time that I use the Keil.

Thanks in advance.

Best regards
Luis Ferreira

Parents
  • Luis,

    The NXP app note code is the problem - not Keil.
    They still have the old Uv2 project file instead of the new UV4 project file (When you close the project it will automatically update to Uv4).

    (1) Use C:\Keil4\ARM\INC\NXP\LPC17xx in the Project-Options->C/C++ include paths window. It seems that the include path is missing the sub-directory \LPC17xx. It is using only C:\Keil4\ARM\INC\NXP

    (2) After correcting that you will get errors such as this:

    target.c(47): error: #20: identifier "PINCON" is undefined.

    Open up the LPC17xx.h file to line 0930 for reference. In target.c, line 47 fix the following way:

    Change PINCON->PINSEL0 to LPC_PINCON->PINSEL0 and so on...

    Then:
    Change GPIO0->FIODIR to LPC_GPIO0->FIODIR and so on...

    Again. These are very simple problems to fix. You need to better understand them. When you use projects from different parties don't expect them to always be plug and play.

    In this time that I work with opensource tools for a 32bits MCU, I experienced that is so hard, but possible. Recently I was try understand what's the advantage of use expensive tools like keil, and if is better start with it and then change for opensource tools.

    The benefits of the Keil environment are evident then?

Reply
  • Luis,

    The NXP app note code is the problem - not Keil.
    They still have the old Uv2 project file instead of the new UV4 project file (When you close the project it will automatically update to Uv4).

    (1) Use C:\Keil4\ARM\INC\NXP\LPC17xx in the Project-Options->C/C++ include paths window. It seems that the include path is missing the sub-directory \LPC17xx. It is using only C:\Keil4\ARM\INC\NXP

    (2) After correcting that you will get errors such as this:

    target.c(47): error: #20: identifier "PINCON" is undefined.

    Open up the LPC17xx.h file to line 0930 for reference. In target.c, line 47 fix the following way:

    Change PINCON->PINSEL0 to LPC_PINCON->PINSEL0 and so on...

    Then:
    Change GPIO0->FIODIR to LPC_GPIO0->FIODIR and so on...

    Again. These are very simple problems to fix. You need to better understand them. When you use projects from different parties don't expect them to always be plug and play.

    In this time that I work with opensource tools for a 32bits MCU, I experienced that is so hard, but possible. Recently I was try understand what's the advantage of use expensive tools like keil, and if is better start with it and then change for opensource tools.

    The benefits of the Keil environment are evident then?

Children