Rev 399 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 399 | Rev 563 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | This is the directory where the user should put it's own node directories. |
1 | This is the directory where the user should put it's own node directories. |
| 2 | If they are placed here the paths will |
2 | If they are placed here the paths will be correct, otherwise the template |
| - | 3 | makefile must be edited. |
|
| - | 4 | ||
| - | 5 | Node directories should be based on ./template for the build system to work |
|
| - | 6 | properly. The ./template directory is probably under subversion control but |
|
| - | 7 | your node directory should not be, so a simple copy is not the correct way. |
|
| - | 8 | Instead use the subversion export feature to extract a clean copy of a |
|
| - | 9 | directory stripped from svn files. |
|
| 3 | 10 | ||
| 4 | Example: |
11 | Example: |
| 5 | AVR/personal |
12 | cd AVR/personal |
| - | 13 | svn export template node_0x04_IrReceiver2 |
|
| - | 14 | ||
| - | 15 | To build and install or upgrade a bios on the node, you have to first setup |
|
| - | 16 | a system.inc based on system.inc.template. |
|
| - | 17 | ||
| 6 |
|
18 | After that, simply: |
| - | 19 | cd node_0x04_IrReceiver2 |
|
| - | 20 | edit bios.inc to suit the node hardware, in particular set NODE_ID correctly. |
|
| - | 21 | make bios |
|
| - | 22 | make installbios (for ISP uploading to a fresh AVR) or |
|
| - | 23 | make upgradebios (for uploading over CAN to a node with a working bios) |
|
| - | 24 | make cleanbios (optional to reduce clutter in bios dir) |
|
| - | 25 | ||
| - | 26 | The recommended layout of the node directory is the following: |
|
| - | 27 | ||
| - | 28 | node_<NODE_ID>_<DESCRIPTION>/ |
|
| - | 29 | | |
|
| - | 30 | |--bios/ (build tree for make bios) |
|
| - | 31 | | | |
|
| - | 32 | | |--bios.h (header file for the bios functions) |
|
| - | 33 | | | |
|
| - | 34 | | |--bios.hex (load file for installing/upgrading bios) |
|
| - | 35 | | | |
|
| - | 36 | | |--bios.map (memory layout of bios for use when linking application) |
|
| - | 37 | | | |
|
| - | 38 | | |--libbios.a (library for linking application with bios functions) |
|
| - | 39 | | | |
|
| - | 40 | | |--... (other build files if make cleanbios hasn't been run) |
|
| - | 41 | | |
|
| - | 42 | |--build/ (build tree for application) |
|
| - | 43 | | | |
|
| - | 44 | | |--... |
|
| - | 45 | | |
|
| - | 46 | |--src/ |
|
| - | 47 | | | |
|
| - | 48 | | |--config.inc.template (template for settings used by the application) |
|
| - | 49 | | | |
|
| - | 50 | | |--main.c (application main source file) |
|
| - | 51 | | | |
|
| - | 52 | | |--Makefile (for building application, invoked by top level Makefile) |
|
| - | 53 | | | |
|
| - | 54 | | |--... (other source or header files used by the application) |
|
| - | 55 | | |
|
| - | 56 | |--bios.inc (settings file for bios) |
|
| - | 57 | | |
|
| - | 58 | |--config.inc (settings file for application) |
|
| - | 59 | | |
|
| - | 60 | |--Makefile (the make file used for all building, maintenance and flashing) |
|
| - | 61 | ||
| - | 62 | This layout is automatically set up if you are using an application in |
|
| - | 63 | ../../application. If this is the case, it's preferred to make the src/ |
|
| - | 64 | directory a link to the application directory so that all nodes with that |
|
| - | 65 | function are using the same source. It also simplifies subversion commits |
|
| - | 66 | which should happen in application/ not in personal/. For example: |
|
| - | 67 | ||
| - | 68 | ln -s ../../application/IrReceive src |
|
| - | 69 | make |
|
| - | 70 | make install |
|
| - | 71 | make start |
|
| - | 72 | make reset |
|
| 7 | 73 | ||
| - | 74 | If you're creating a node specific application which doesn't fit in |
|
| - | 75 | ../../application, the src/ directory should still be based on |
|
| - | 76 | ../../application/template, which could be copied and stripped with svn export |
|
| - | 77 | as above. |
|