GithubHelp home page GithubHelp logo

nekromant / antares Goto Github PK

View Code? Open in Web Editor NEW
208.0 208.0 31.0 7.47 MB

antares uC buildsystem

Makefile 0.62% Shell 0.20% C 59.37% Perl 0.55% Lua 0.04% C++ 37.05% Assembly 1.72% PHP 0.18% HTML 0.11% Objective-C 0.16%

antares's People

Contributors

alhirzel avatar d-a-v avatar george-hopkins avatar gitter-badger avatar im-0 avatar jaseg avatar jauler avatar jellybob avatar mwhitehood avatar nekromant avatar pastcompute avatar soyersoyer avatar tpimh avatar webconn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

antares's Issues

stm32: fix STM32F4xxx support

Create a full (or close to that) suport of STM32F4xxx Series controllers.
For this reason, stm32f4_fix branch is opened.

Build for each arch from one project. Multi Targets

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?

Remove warning in src/lib/printk.c

**_/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.

tmgr library is buggy and incomplete

tmgr has the following issues:

  • Race condition in tmgr_register. If the interrupt kicks in while registration in progress, things can get screwed up.
  • tmgr_tick is overcomplicated, and uses far too much time in interrupt context.
  • Obviously there are convenience functions like set_rate() and uptime_to_ms/ns/s
  • Using always 'unsigned int' as a bad idea. Generally user would want to specify what resolution he needs. (especially on 8-bit avr stuff). using uintX_t types wrapper in uptime_t suggested
  • Rename/move to lib/tmgr.c include/tmgr.h
  • prefix everything with tmgr_

Remove src/app directory

There is a piece of old unused code in src/app. Since Antares works out-of-tree, this dir should be removed.

Implement test cases for library routines.

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.

earlycon: stm32 backend needed

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.

Implement ARCH_HAS_XXX mechanism.

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.

Build clear gnu assembler code

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

Use a better naming convention for header guards.

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.

Make does not know how to skip .git directory

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.

msp430 delaylib #endif

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
-}

Serial debugging needs major rework

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:

  1. linux kernel-like early-printk for all the code before ISRs enabled globally.
  2. Buffered interrupt-based implementations for most platforms.
  3. printk() should NOT depend on buggy tmgr

Ignore rebuilding subdirectories' files without cleaning the tree

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.