New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IAR compilation error with NUCLEO targets #482
Comments
The error is due to a different definition of NULL in ST HAL driver (void* 0) compared to the one defined in stddef.h for example (0). |
If you have fixed it, please close this issue. Thanks |
No, it is not fixed yet. |
The STM32Cube driver of all Nucleo targets must be corrected to compile with IAR: change NULL by HAL_NULL. The pull request #560 corrects it on the F411RE target. Other targets correction are on-going... |
I believe this should be resolved now. Thanks |
I have this error when compiling NUCLEO_F401RE target with IAR:
Compile: FilePath.cpp
[Error] FileSystemLike.h@86: [Pe120]: return value type ("void *") does not match the function type ("mbed::DirHandle *")
[Error] FilePath.cpp@20: [Pe144]: a value of type "void *" cannot be used to initialize an entity of type "char const *"
[Error] FilePath.cpp@20: [Pe144]: a value of type "void *" cannot be used to initialize an entity of type "mbed::FileBase *"
[Error] FilePath.cpp@56: [Pe120]: return value type ("void *") does not match the function type ("mbed::FileSystemLike *")
[Error] FilePath.cpp@69: [Pe120]: return value type ("void *") does not match the function type ("mbed::FileLike *")
"C:\GitHub\mbed\build\mbed\FileSystemLike.h",86 Error[Pe120]: return value type ("void *") does not match the function type ("mbed::DirHandle *")
FilePath::FilePath(const char* file_path) : file_name(NULL), fb(NULL) {
^
"C:\GitHub\mbed\libraries\mbed\common\FilePath.cpp",20 Error[Pe144]: a value of type "void *" cannot be used to initialize an entity of type "char co
nst *"
FilePath::FilePath(const char* file_path) : file_name(NULL), fb(NULL) {
^
"C:\GitHub\mbed\libraries\mbed\common\FilePath.cpp",20 Error[Pe144]: a value of type "void *" cannot be used to initialize an entity of type "mbed::F
ileBase *"
"C:\GitHub\mbed\libraries\mbed\common\FilePath.cpp",56 Error[Pe120]: return value type ("void *") does not match the function type ("mbed::FileSystem
Like *")
"C:\GitHub\mbed\libraries\mbed\common\FilePath.cpp",69 Error[Pe120]: return value type ("void *") does not match the function type ("mbed::FileLike *
")
from os.path import join
ARM_PATH = "C:\Keil_v5\ARM\armcc"
ARM_BIN = join(ARM_PATH, "bin")
ARM_INC = join(ARM_PATH, "include")
ARM_LIB = join(ARM_PATH, "lib")
IAR_PATH = "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm"
For information, same command line and settings with LPC1768 works fine.
The text was updated successfully, but these errors were encountered: