Hello everyone,
I'd like to use a more serious IDE than the Arduino IDE; thus, I'd like to be able to compile without it. Is there any public Makefile or something for the Z-Uno stuff? Even when enabling debug output, there are still some commands missing on the terminal, so I'm having trouble making my own one...
Thanks!
Makefile for the Z-Uno
Re: Makefile for the Z-Uno
You can check the package file to see files how Arduino IDE is invoking our compiler. On Linux you can even do strace -e trace=system -f ./arduino to see commands executed
May be you can post your recipe then
May be you can post your recipe then
Re: Makefile for the Z-Uno
Ok thank you, I'll try to find it out using strace
Re: Makefile for the Z-Uno
Hi again,
I more or less got where I wanted to get. I did try to invoke sdcpp / sdcc myself, however it's complicated to follow all the calls. I did find a way to utilize the "compiler" binary that builds a sketch; this way, I've built a (very basic) Makefile and a project template.
The code is here:
https://github.com/jucs/embedded-templa ... no-project
The main project file is project.cpp. Additional files can be added in src/ which is a link into the libraries directory from which cpp file seem to be compiled. Building is done as follws:
The program can then be transferred using make:
Don't forget to add the header file paths in Z-Uno/... in the project configuration of your favorite IDE so the indexer finds them .
I more or less got where I wanted to get. I did try to invoke sdcpp / sdcc myself, however it's complicated to follow all the calls. I did find a way to utilize the "compiler" binary that builds a sketch; this way, I've built a (very basic) Makefile and a project template.
The code is here:
https://github.com/jucs/embedded-templa ... no-project
The main project file is project.cpp. Additional files can be added in src/ which is a link into the libraries directory from which cpp file seem to be compiled. Building is done as follws:
Code: Select all
make build
Code: Select all
PORT=ttyACM0 make transfer
Re: Makefile for the Z-Uno
I use Sublime editor for thiss:
Here is my environment(MacOS X, sublime):
1. Build file (.sublime-build):
You have to change this to path to your core-files (you can find them in Arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.20/Arduino15/hardware) and to sdcc-path (it's located in Arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.20/zuno_toolchain/sdcc).
2. zme_zunocompiler script(have to be in your PATH):
Here is my environment(MacOS X, sublime):
1. Build file (.sublime-build):
Code: Select all
"shell": false,
"working_dir" : "$file_path",
"selector": "source.c",
"cmd": ["zme_zunocompiler","build","${file_path}/${file_name}","-r","/Users/alexander/WholeEnvironment/Z-Uno/hardware/zw8051/2.x.x", "-p", "/Users/alexander/Code/ZUno/compilerCXX/sdcc/"],
"variants":
[
{
"name":"Upload sketch",
"cmd": ["zme_zunocompiler","prog","${file_path}/${file_name}","-d","/dev/cu.usbmodem621","-p","sec=0","-p","mcmd=0"]
}
]
}
Code: Select all
/Users/alexander/WholeEnvironment/Z-Uno/hardware/zw8051/2.x.x
Code: Select all
/Users/alexander/Code/ZUno/compilerCXX/sdcc
2. zme_zunocompiler script(have to be in your PATH):
Code: Select all
#!/bin/sh
~/Library/Arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.20/zuno_toolchain/compiler $@