portasm.o is not an object or archive file

mohamadpb wrote on Sunday, November 26, 2017:

Hello.i using iar compiler , stm32f103 microcontroller and SPL library.i trying to use FreeRtos and everything is ok but this error:
Fatal Error[Li004]: file “\Project F1\EWARM\Debug\Obj\portasm.o” is not an object or archive file

rtel wrote on Sunday, November 26, 2017:

Where did you get the project from? Us, or did you create it yourself.

Have you tried deleting all the .o and other build files from the
project and doing a clean build?

(This sounds like a tools issue rather than a FreeRTOS issue).

mohamadpb wrote on Sunday, November 26, 2017:

i download that files from FreeRtos site
FreeRTOSv9.0.0\FreeRTOS\Source
yes i do that for 100 times :(((

rtel wrote on Sunday, November 26, 2017:

i download that files from FreeRtos site
FreeRTOSv9.0.0\FreeRTOS\Source
yes i do that for 100 times :(((

Sure - but where did the project come from? Did you create it yourself
or was it a project we provided in the FreeRTOS/Demo directory.

If it is a project we provided let me know which one it is and I will
try it here.

If it is a project that you created then:

  • Check the object file actually exists, it is the only one coming from
    the assembler rather than the compiler.

  • Check the complete directory path to the file is not too long
    (unlikely to be the cause, but can try).

  • Compare the assembler settings in the project with one of the projects
    we provide (in the demo directory) to see if there are any differences.

mohamadpb wrote on Sunday, November 26, 2017:

thank you Mr.Enginner.fixed and uploaded.but didnt work
here is my main.c file
just print “hi”

heinbali01 wrote on Monday, November 27, 2017:

All right, maybe you wrote main.c, but who assembled the project? Where did you download it from?

Although I also think that you are facing a problem with the tools, rather than FreeRTOS, some remarks and questions:

Fatal Error[Li004]: file “\Project F1\EWARM\Debug\Obj\portasm.o” is not an object or archive file

Not sure if it helps, but could you try to use a directory that does not contain any spaces?
E.g. use “\Project_F1” with an underscore.
Still today, there are tools / environments that do not understand spaces in a path.

Does portasm.o exist at all? Does portable\IAR\ARM_CM0\portasm.s get assembled?
Do you see logging about that?

mohamadpb wrote on Monday, November 27, 2017:

Hi Mr.Hein . thanks for your post.
i just download them from this link
https://sourceforge.net/projects/freertos/files/FreeRTOS/
FreeRTOSv9.0.0.exe (16.1 MB)
and i made project my self
i clean my project and rebuild it
my error was fixed
i mean this error
Fatal Error[Li004]: file “\Project F1\EWARM\Debug\Obj\portasm.o” is not an object or archive file
and uploaded to my board
but didnt work just print hhi to my serial port
its just one task