/** * @file nxt_simple.oil * * @section desc File description * * This application is made of two tasks. The lower priority task1 is autostart. * It prints its name to the display, initialize the motorA to 50% of its speed * and do an infinit loop. task5 is connected to an alarm which is launched every * second. It increases motorB speed by 5% (as the type of the speed parameter * is an 8 bits, once arrived to 256, it will change its sens) and prints its * name to the display. The NXT buttons are connected to ISR2s thus if you press * the left, right or "orange" button, each ISR2s will print to the display the * ISR2 name. The stop button shutdowns the Trampoline application. * * @section copyright Copyright * * Trampoline is copyright (c) IRCCyN 2005-2007 * Trampoline is protected by the French intellectual property law. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * @section infos File informations * * $Date$ * $Rev$ * $Author$ * $URL$ */ OIL_VERSION = "2.5" : "test" ; IMPLEMENTATION trampoline { TASK { UINT32 STACKSIZE = 500 ; UINT32 PRIORITY = 1 ; } ; ISR { UINT32 STACKSIZE = 500 ; } ; }; CPU test { OS config { STATUS = EXTENDED; ERRORHOOK = FALSE; PRETASKHOOK = FALSE; BUILD = TRUE { TRAMPOLINE_BASE_PATH = "/trampoline"; APP_SRC = "nxt_simple.c"; APP_NAME = "nxt_simple_exe"; // CFLAGS = "-g -Wall -pedantic -Wformat -std=c99 -mcpu=arm7tdmi-s -Wmissing-field-initializers "; //TODO : Check if all the options are useful CFLAGS = "-g -c -ffreestanding -fsigned-char -mcpu=arm7tdmi -Os -Winline -Wall -Werror-implicit-function-declaration --param max-inline-insns-single=1000 -ffunction-sections -fdata-sections -std=gnu99 -I/trampoline/machines/arm/nxt/drivers/lejos_nxj/src/nxtvm/platform/nxt -I/trampoline/machines/arm/nxt/drivers/ecrobot/c -I/trampoline/machines/arm/nxt/drivers -I/trampoline/machines/arm/nxt/drivers/ecrobot/bios -I/trampoline/machines/arm/nxt/drivers/lejos_nxj/src/nxtvm/javavm -I/trampoline/os -DTRUE=1 -DFALSE=0 -Du8=uint8 -Du32=uint32 -Du16=uint16"; //-MD "; ASFLAGS = "-g -mcpu=arm7tdmi-s --fatal-warnings "; LDFLAGS = "-g --allow-multiple-definition --gc-sections -L/usr/arm-none-eabi/lib -L/usr/lib/gcc/arm-none-eabi/7.3.1 -lc -lm -lgcc"; //--cref COMPILER = "arm-none-eabi-gcc"; ASSEMBLER = "arm-none-eabi-as"; LINKER = "arm-none-eabi-ld"; }; SYSTEM_CALL = TRUE; MEMMAP = TRUE{ COMPILER = gcc; LINKER = gnu_ld { SCRIPT = "script.ld"; }; ASSEMBLER = gnu_as; MEMORY_PROTECTION = FALSE; }; } ; APPMODE std { }; TASK task1 { PRIORITY = 1; AUTOSTART = TRUE { APPMODE = std; }; ACTIVATION = 1; SCHEDULE = FULL; }; TASK task5 { PRIORITY = 2; AUTOSTART = FALSE; ACTIVATION = 1; SCHEDULE = FULL; }; COUNTER SystemCounter { SOURCE = it_timer1; MAXALLOWEDVALUE = 2000; TICKSPERBASE = 1; MINCYCLE = 1; }; ALARM Alarm1{ COUNTER = SystemCounter; ACTION = ACTIVATETASK { TASK = task5; }; AUTOSTART = TRUE { ALARMTIME = 2000; CYCLETIME = 1000; //each 1000 ms. APPMODE = std; }; }; ISR isr_button_start { CATEGORY = 2; PRIORITY = 1; SOURCE = button_start; }; ISR isr_button_stop { CATEGORY = 2; PRIORITY = 1; SOURCE = button_stop; }; ISR isr_button_left { CATEGORY = 2; PRIORITY = 1; SOURCE = button_left; }; ISR isr_button_right { CATEGORY = 2; PRIORITY = 1; SOURCE = button_right; }; }; /* End of file nxt_simple.oil */