nekromant / antares Goto Github PK
View Code? Open in Web Editor NEWantares uC buildsystem
antares uC buildsystem
These are required to wrap critical sections in libraries.
Stock xc32 ld scripts look murky, Need more love
**_/antares/src/lib/printk.c:17:15: warning: ‘p_stdin’ defined but not used [-Wunused-variable]
static FILE *_p_stdin = &g_early_stdin;
Let's do something with this.
Usually compile
avr-gcc -Xassembler -ggdb -mmcu=atmega16a example.S -o example.o
example.S code in our cite http://crafting.be/2013/09/simulavr-start/
I add -g (Debug information) and add -Xassembler (CC options)
$ ls src/
main.S Makefile
$ cat src/Makefile
objects-y+=main.o
Antares output
[INFO] Building application code
make OBJDIR=/home/valber/forge/pmg/embended/newpinboardtrash/build/app SRCDIR=/home/valber/forge/pmg/embended/newpinboardtrash/src \
-C /home/valber/forge/pmg/embended/newpinboardtrash/build/app \
TMPDIR=/home/valber/forge/pmg/embended/newpinboardtrash/tmp -f /home/valber/forge/pmg/embended/newpinboardtrash/antares/make/Makefile.build -r build
make[1]: Вход в каталог `/home/valber/forge/pmg/embended/newpinboardtrash/build/app'
avr-gcc -mmcu=atmega16 -DF_CPU=16000000 -Xassembler -include /home/valber/forge/pmg/embended/newpinboardtrash/include/generated/autoconf.h -Os -Wall -I/home/valber/forge/pmg/embended/newpinboardtrash/include -I/home/valber/forge/pmg/embended/newpinboardtrash/antares/include -g -g -MD -MP -MF main.o.d -c -o main.o /home/valber/forge/pmg/embended/newpinboardtrash/src/main.S
avr-gcc: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated.
make[1]: *** [main.o] Error 1
make[1]: Выход из каталога `/home/valber/forge/pmg/embended/newpinboardtrash/build/app'
make: *** [builtin] Error 2
Since there is now a 'native' architecture that uses host compiler it is now possible to implement the test coverage for supplied routines that can be run on a host pc.
So far there's no simple way to get the RAM size at compile time.
It looks like perhaps there's an #endif out of order at the bottom of msp430/delaylib.c
Here's the diff that patched it for me:
diff --git a/src/lib/msp430/delaylib.c b/src/lib/msp430/delaylib.c
index 0972c3b..a91dce4 100644
--- a/src/lib/msp430/delaylib.c
+++ b/src/lib/msp430/delaylib.c
@@ -56,9 +56,9 @@ void delaylib_print_summary()
printf("delaylib: cycles_per_s %lu cycles_per_ms %lu cycles_per_us %lu\n",
CYCLES_PER_S, CYCLES_PER_MS, CYCLES_PER_US);
#endif
+}
#endif
-}
Since the buildsystem is getting bigger we need to be able to draw a nice&shiny graph of build deps.
tmgr has the following issues:
subj
webconn, I have finally implemented the earlycon subsystem (see antares/src/lib/console) that is automatically hooked to printks.
See if you can add STM32 (Serial port) backend, while I'm working on a proper portable console subsystem that will make use of interrupts and a circular buffer that can kick in later.
You can use existing earlycon-avrserial.c, earlycon-stc.c and earlycon-native.c as a reference.
For stm32 there's a simple stlinky backend already in there.
Unless we want to release 0.2-rc1 untested
Right now stuff like 'antares startup code' shows up even if not supported.
Solution: depend on ARCH_HAS_ANTARES_STARTUP, set it by select in ARCH_XXX.
This requires changes to list generation scripts.
The way arch list is generated now should DIE.
Subj.
cppcheck of the curently configured project would be useful.
I would like to point out that identifiers like "__STLINKY_H
" and "_STRFUNC
" do not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?
Implement scank feature for early console.
As @elfring suggested, current naming scheme can lead to clashes with user project header files and can cause a lot of headache.
So far the idea is to use A_INCLUDE_LIB_MYHEADER_H naming convention to avoid clashes and add some automation script.
Subj
I think that these blocks should be very useful, because use of ANTARES_ENABLE/DISABLE_IRQS for atomic and non-atomic blocks forces enabling or disabling interrupts but not saves the state.
See http://www.nongnu.org/avr-libc/user-manual/group__util__atomic.html for example of what I mean.
Create a full (or close to that) suport of STM32F4xxx Series controllers.
For this reason, stm32f4_fix branch is opened.
Just followed the GETTING_STARTED.txt and I get errors trying to get the STM32 working.
ERROR:
make: *** No rule to make target `/home/uminded/antares_projects/test/antares/.git', needed by `/home/uminded/antares_projects/test/tmp/.version'. Stop.
Full log:
┌─(uminded@uminded-desktop)─(11:17 PM)
├─(~/antares_projects/test)─(0 files, 8.0Kb)
├─(✓ 0)─(0.36)─(154/15979MB)
└─> aproj
It looks like the examples repository hasn't been downloaded yet.
Do you want me to clone the examples repository? [y/n]
yCloning into '/home/uminded/.antares_examples'...
remote: Counting objects: 163, done.
remote: Compressing objects: 100% (122/122), done.
remote: Total 163 (delta 54), reused 132 (delta 23)
Receiving objects: 100% (163/163), 28.49 KiB, done.
Resolving deltas: 100% (54/54), done.
Pick an example project you want to start with
1) ./native/hello_world 8) ./mips/1890_asm
2) ./arm/stm32/stm32blinky 9) ./mips/1890_c
3) ./arm/stm32/stm32vlblinkyusart 10) ./avr/atmega16-asm-example
4) ./arm/stm32/stm32vl-stlinkydemo 11) ./avr/uisp-app
5) ./8051/at89c5113-blinky 12) ./avr/2313-blinky
6) ./8051/stc/urpc_demo 13) ./msp430/msp-exp430fr5739
7) ./8051/stc/blink 14) ./msp430/launchpad
#? 2
Initialized empty Git repository in /home/uminded/antares_projects/test/.git/
The following paths are ignored by one of your .gitignore files:
Makefile
Use -f if you really want to add them.
fatal: no files added
ln -sf /home/uminded/.antares ./antares
Using global antares installation: /home/uminded/.antares
Symlinking done, please re-run make
Template installed, repo created. Please do the initial git commit now
┌─(uminded@uminded-desktop)─(11:17 PM)
├─(~/antares_projects/test)─(4 files, 36Kb)
├─(✓ 0)─(0.30)─(154/15979MB)
└─> make menuconfig
[GEN] /home/uminded/antares_projects/test/tmp/deploy.mk
[GEN] /home/uminded/antares_projects/test/tmp/arch.mk
[CHECK] bash
[CHECK] sed
[CHECK] awk
[GEN] /home/uminded/antares_projects/test/tmp/arch.kcnf
[GEN] /home/uminded/antares_projects/test/tmp/all-arch.kcnf
[GEN] /home/uminded/antares_projects/test/tmp/deploy.kcnf
[GEN] /home/uminded/antares_projects/test/tmp/all-deploy.kcnf
[GEN] /home/uminded/antares_projects/test/tmp/edeploy.mk
[GEN] /home/uminded/antares_projects/test/tmp/edeploy.kcnf
[GEN] /home/uminded/antares_projects/test/tmp/all-edeploy.kcnf
make: *** No rule to make target `/home/uminded/antares_projects/test/antares/.git', needed by `/home/uminded/antares_projects/test/tmp/.version'. Stop.
┌─(uminded@uminded-desktop)─(11:19 PM)
├─(~/antares_projects/test)─(9 files, 56Kb)
├─(✓ 0)─(0.39)─(154/15979MB)
└─> make build
make: *** No rule to make target `/home/uminded/antares_projects/test/antares/.git', needed by `/home/uminded/antares_projects/test/tmp/.version'. Stop.
If there are some subdirs in app source tree (of cource, described in src/Makefile as subdirs-y=nameofdir), objects built once after cleaning of source tree, but if source files in subdirectory are changed, the buildsystem ignores this fact until user don't clean the tree (using make clean)
What do you think about building in the one project more than one architecture (without any reconfiguration)? Or for more than one board?
For example I want to build project for ARM (for board TEST1), AVR (for board TEST2) and Host (for unit tests).
Maybe create subdirectories in the "image" directory: arm_[board], avr_[board] and other?
Right now serial debugging is platform specific, that sucks for library code. A more generic approach should be implemented around printk.c and dbg()/inf()/warn() macros:
Shipping a dozen of ld scripts with antares is not an option
There is a piece of old unused code in src/app. Since Antares works out-of-tree, this dir should be removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.