We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello guys!
I'm just starting to use the LPC17xx MCU, using the Keil uVision4 as the design tool. I want to build a new project, using the outstanding CMSIS library, because this is a complete driver library for the MCU peripherals.
After studying the CMSIS included examples, I tried to create a new project, adding all the necessary header and source files of the drivers. (And the Cortex-M driver files too).
I created a simple "main.c" program just for testing the project.
The compiler results of some drivers source files (lpc17xx_gpio.c, lpc17xx_dac.c, etc) show me lots of warnings, but no errors.
And the CMSIS examples, with the same files and structure, compiles without any error.
I just don't know what to do!!!! I think that the problem is in the "lpc17xx_libcfg_default.h" ou the "lpc17xx_libcfg.h" file.
Please, help me.
Regards from Brazil.
---------------------------------------------------------------------------------- Here is the Build Output text result (using just the gpio.c file)
assembling startup_LPC17xx.s... compiling core_cm3.c... compiling system_LPC17xx.c... compiling lpc17xx_gpio.c... ..\..\..\Drivers\source\lpc17xx_gpio.c(293): warning: #188-D: enumerated type mixed with another type ..\..\..\Drivers\source\lpc17xx_gpio.c: return (((LPC_GPIOINT->IO0IntStatR)>>pinNum)& 0x1); ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(295): warning: #188-D: enumerated type mixed with another type ..\..\..\Drivers\source\lpc17xx_gpio.c: return (((LPC_GPIOINT->IO2IntStatR)>>pinNum)& 0x1); ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(297): warning: #188-D: enumerated type mixed with another type ..\..\..\Drivers\source\lpc17xx_gpio.c: return (((LPC_GPIOINT->IO0IntStatF)>>pinNum)& 0x1); ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(299): warning: #188-D: enumerated type mixed with another type ..\..\..\Drivers\source\lpc17xx_gpio.c: return (((LPC_GPIOINT->IO2IntStatF)>>pinNum)& 0x1); ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(617): warning: #186-D: pointless comparison of unsigned integer with zero ..\..\..\Drivers\source\lpc17xx_gpio.c: if ((byteNum >= 0) && (byteNum <= 3)) { ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(623): warning: #186-D: pointless comparison of unsigned integer with zero ..\..\..\Drivers\source\lpc17xx_gpio.c: if ((byteNum >= 0) && (byteNum <= 3)) { ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(655): warning: #186-D: pointless comparison of unsigned integer with zero ..\..\..\Drivers\source\lpc17xx_gpio.c: if ((byteNum >= 0) && (byteNum <= 3)) { ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(661): warning: #186-D: pointless comparison of unsigned integer with zero ..\..\..\Drivers\source\lpc17xx_gpio.c: if ((byteNum >= 0) && (byteNum <= 3)) { ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(687): warning: #186-D: pointless comparison of unsigned integer with zero ..\..\..\Drivers\source\lpc17xx_gpio.c: if ((byteNum >= 0) && (byteNum <= 3)){ ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(712): warning: #186-D: pointless comparison of unsigned integer with zero ..\..\..\Drivers\source\lpc17xx_gpio.c: if ((byteNum >= 0) && (byteNum <= 3)){ ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c(732): warning: #186-D: pointless comparison of unsigned integer with zero ..\..\..\Drivers\source\lpc17xx_gpio.c: if ((byteNum >= 0) && (byteNum <= 3)){ ..\..\..\Drivers\source\lpc17xx_gpio.c: ^ ..\..\..\Drivers\source\lpc17xx_gpio.c: ..\..\..\Drivers\source\lpc17xx_gpio.c: 11 warnings, 0 errors compiling main.c... linking... Program Size: Code=124 RO-data=644 RW-data=0 ZI-data=512 "projeto1.axf" - 0 Error(s), 11 Warning(s).
NXP should be shot for shipping such rubbish!
See: www.8052.com/.../174319 - on the subject of poor coding standards in so-called "example" (sic) code...
:-(