I am having no success in building a program via the command line. I have copy-pasted the command sent by the IDE and this just gives error messages:
File '__Lib_Math.c' not found
...
I get the same results with the 'example' from the command line options Help page.
It would be nice to get this functioning correctly so that I can investigate the compiler via a Makefile.
David.
Command Line Compiler mikroCAVR.exe
Re: Command Line Compiler mikroCAVR.exe
We have changed names of system libraries, and help did not follow that change. We will fix this in help file. Thank you for your report.David Prentice wrote:I am having no success in building a program via the command line. I have copy-pasted the command sent by the IDE and this just gives error messages:
File '__Lib_Math.c' not found
...
I get the same results with the 'example' from the command line options Help page.
It would be nice to get this functioning correctly so that I can investigate the compiler via a Makefile.
David.
here is the functionall example:
Code: Select all
mikrocAVR.exe -MSF -DBG -pATMEGA16 -ES -C -O11111114 -fo8 -N"C:\Program Files\Mikroelektronika\mikroC PRO for AVR\Examples\Development Systems\EasyAVR5A\Led Blinking\LedBlinking.mcpav" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for AVR\Defs" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for AVR\Uses\LTE64KW" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for AVR\Examples\Development Systems\EasyAVR5A\Led Blinking" "LedBlinking.c" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl"
If you need more info about which libraries are supported and their file names you can find that in *.mlk file which is located in INSTALLATION_DIR\defs\.
mlk are xml files that are used by compiler and linker (these files gives description of device and which libraries are suppotred for specific device) . Adding your own custom libraries is possible see
Creating New Library section in help.
In def folder apart mlk files there are *.c files which have all definitions of sfr and sfr bits.
This file is also easy to find by right-clicking for example PORTB in code editor and
selecting find declaration (project for specific mcu must be opened before).
-
- Posts: 8
- Joined: 30 Oct 2008 12:23
Thanks for your help. I have got a makefile working now. The command line seems to need trailing backslashes for the search path. Although the Windows filesystem understands slashes as path separators, MikroCAvr.exe does not.
Incidentally I have now discovered a "unique" predefined macro __MCPP that I can use to distinguish compilers.
I can use regular library headers to give function prototypes. However you still need the "invisible" "Uses" path for system internal functions. The compiler appears to find the "Defs" path all by itself.
David.
Incidentally I have now discovered a "unique" predefined macro __MCPP that I can use to distinguish compilers.
I can use regular library headers to give function prototypes. However you still need the "invisible" "Uses" path for system internal functions. The compiler appears to find the "Defs" path all by itself.
David.