trampolinertos / trampoline Goto Github PK
View Code? Open in Web Editor NEWTrampoline is a static RTOS for small embedded systems. Its API is aligned with OSEK/VDX OS and AUTOSAR OS 4.2 standards.
License: GNU General Public License v2.0
Trampoline is a static RTOS for small embedded systems. Its API is aligned with OSEK/VDX OS and AUTOSAR OS 4.2 standards.
License: GNU General Public License v2.0
File os/tpl_os_kernel.c, lines 1215 & 1254 :
if ((TPL_KERN_REF(kern).running->resources) != NULL){
tpl_release_all_resources((tpl_proc_id)TPL_KERN_REF(kern).running_id);
}
File goil/templates/tpl_app_config_c.goilTemplate :
tpl_resource_table[RESOURCE_COUNT] = {%
foreach resource in REGULARRESOURCES
before %
%
do
%&% !resource::NAME %_rez_desc%
between
%,
%
after %,%
end foreach
%
&res_sched_rez_desc
};
The resource API is needed for the calls of tpl_release_all_resources function and for the use of res_sched_rez_desc resource, however in file goil/templates/api.goilTemplate :
if [RESOURCES length] > 0 | OS::USERESSCHEDULER then
let APIUSED += APIMAP["resource"]
end if
The Api resource is included only if we have some resources or if we're using the RES_SCHEDULER (set to TRUE by default).
Should we always use a part of the Resource API or can we just ignore the the function calls and the resource with if statments using WITH_USERESSCHEDULER and RESOURCE_COUNT definitions for tpl_os_kernel.c and [RESOURCES length] and OS::USERESSCHEDULER for tpl_app_config_c.goilTemplate ?
Hello, I follow a course you give each week in my school. We use stm32 components and I wanted to try the RTOS on a Raspberry Pi 2 card. I discussed with Mr. Briday and He gave me the path to the rpi examples. I have the following errors when I run this command:
goil --target=cortex-a/armv7/bcm2836/rpi2 --templates=../../../../../../goil/templates/ blink.oil
Created 'blink/tpl_dispatch_table.c'.
Created 'blink/tpl_invoque.S'.
Created 'blink/tpl_os.h'.
Created 'blink/tpl_service_ids.h'.
Created 'build.py'.
Created 'make.py'.
Created 'blink/tpl_app_custom_types.h'.
/home/nicolas/I3/temps_reel/trampoline/goil/templates/code/cortex-a/armv7/bcm2836/counter_call.goilTemplate:23:40:44:
semantic error #1: a string is not a struct
% tpl_counter_tick(&% !cpt_fct::VALUE %_counter_desc);
---------------------------------------^^^^^
/home/nicolas/I3/temps_reel/trampoline/goil/templates/code/cortex-a/armv7/bcm2836/counter_call.goilTemplate:23:30:30:
semantic error #2: runtime error
% tpl_counter_tick(&% !cpt_fct::VALUE %_counter_desc);
-----------------------------^
/home/nicolas/I3/temps_reel/trampoline/goil/templates/code/cortex-a/armv7/bcm2836/counter_call.goilTemplate:16:3:9:
semantic error #3: runtime error
foreach cpt_fct in counterFct
--^^^^^^^
/home/nicolas/I3/temps_reel/trampoline/goil/templates/code/cortex-a/armv7/bcm2836/counter_call.goilTemplate:9:1:7:
semantic error #4: runtime error
foreach interrupt in INTERRUPT_SOURCE do
^^^^^^^
/home/nicolas/I3/temps_reel/trampoline/goil/templates/code/tpl_app_config_c.goilTemplate:453:1:8:
semantic error #5: runtime error
template counter_call
^^^^^^^^
/home/nicolas/I3/temps_reel/trampoline/goil/templates/root.goilTemplate:1436:3:10:
semantic error #6: runtime error
template tpl_app_config_c in code
--^^^^^^^^
/home/nicolas/I3/temps_reel/trampoline/goil/templates/root.goilTemplate:1435:1:5:
semantic error #7: runtime error
write to PROJECT+"/tpl_app_config.c":
^^^^^
Created '/home/nicolas/I3/temps_reel/trampoline/examples/cortex-a/armv7/bcm2836/rpi2/blink/build/blink.oil.dep'.
No warning, 7 errors.
May you help me? If I adapt the goil command to another directory like "cortex/armv7m/SmartFusion2/starterKit/blink/" I don't meet any error.
Sincerely,
nicolasDSS.
When defining and ISR1 with, for instance, name my_isr
in the OIL file, the following code is generated (here the interrupt source is the FTM0 module of the mk20dx256, check : https://github.com/TrampolineRTOS/trampoline/blob/master/goil/templates/config/cortex/armv7/mk20dx256/config.oil
tpl_vectors.c
: (tpl_it_handler) my_isr_function,
tpl_app_config.c
:FUNC(void, OS_CODE) tpl_interrupt_source_78()
{
my_isr_function();
}
The later is unused
I believe tpl_vectors.c
should contain: (tpl_it_handler) tpl_interrupt_source_78,
and tpl_app_config.c
should contain:
FUNC(void, OS_CODE) tpl_interrupt_source_78()
{
my_isr_function();
FTM0_IRQ_ClearFlag();
}
In addition, using FTM0_IRQ_Handler()
instead of tpl_interrupt_source_78()
would be nice.
The goil compilation fails on Linux 64 bits (master branch, yesterday). It seems to be related to libpm:
In file included from ../build/libpm/galgas2/all-galgas.cpp:40:0:
../build/libpm/galgas2/GALGAS_char.cpp: In static member function ‘static GALGAS_char GALGAS_char::constructor_unicodeCharacterFromRawKeyboard(C_Compiler*)’:
../build/libpm/galgas2/GALGAS_char.cpp:101:33: error: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
read (STDIN_FILENO, & c, 1) ;
^
The gcc version: gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
, with Ubuntu 14.04.
The python build system is limited to python 2.x
When a task is preempted, its context seems to not be saved or restored correctly. More investigation should be done to fix the problem.
Hello,
When tpl_start() is called (file : tpl_os_kernel.c) to start a task and the task's state is "READY_AND_NEW" then we need to :
Currently the change of state is done only when the number of cores is greater than one (line 738 to 740 of tpl_os_kernel.c file), however I think we need to do it also for the single-core case.
In the svc handler, the return code (r0) is not copied back in the process stack.
In fact, instead of saving the return code of the service in the system stack on line 241:
str r0, [r5, #KS_RETURN_CODE]
It could be saved on the process stack directly. The saved r0 being on the top of the process stack, the line above could be replaced by:
ldr r12, [r5, #KS_PROCESS_SP]
str r0, [r12]
As a result, the tpl_save_context function would not have to save the return code in the context and line 84, 85, 123 and 124 of tpl_ctx_switch.S would be deleted.
Line 318 of tpl_system_call.S would be deleted too.
The file autosar/tpl_as_timing_protec.c always includes assert.h and stdio.h.
File goil/templates/code/memory_region_descriptor.goilTemplate
5 if AUTOSAR then %
1 extern void *__SEG_START_OS_APP_% !proc::APPLICATION %_VAR_RGN;
2 extern void *__SEG_END_OS_APP_% !proc::APPLICATION %_VAR_RGN;%
3 end if %
Included from goil/templates/code/tpl_app_config_c.goilTemplate
738 if USEMEMORYPROTECTION then
1 foreach proc in PROCESSES do
2 template memory_region_descriptor
3 end foreach
The proc::APPLICATION property doesn't exists here.
This property is added in the file goil/templates/root.goilTemplate
5 foreach task in TASKS do
4 if not exists task_map[task::NAME] then
3 error task::NAME : "TASK ".task::NAME." does not belong to any Application"
2 else
1 let app := [task_map[task::NAME] first]
984 let task::APPLICATION := app::VALUE
1 let task::TRUSTED := app_map[app::VALUE]::TRUSTED
2 let task_with_app += task
3 end if
4 end foreach
However, the PROCESSES list is created before in the same file
1 #------------------------------------------------------------------------------*
342 # compute the list of PROCESSES, TASKS
1 #
2 let PROCESSES := emptylist
3 let TASKS := emptylist
4 foreach task in EXTENDEDTASKS do
5 let PROCESSES += task
6 let TASKS += task
7 end foreach
8 foreach task in BASICTASKS do
9 let PROCESSES += task
10 let TASKS += task
11 end foreach
12 foreach isr in ISRS2 do
13 let PROCESSES += isr
14 end foreach
So the PROCESSES list cannot contain the APPLICATION property.
I've noticed an issue with script.goiltemplate for the stm32f407 target, although taking a quick glance at other architectures it seems present as well.
The code starting at line 252 of script.goiltemplate will cause an error upon evaluating __SEG_ALIGN_% !proc::KIND %_% !proc::NAME %_STACK_RGN
(namely in the previous ALIGN referencing it) if the size of the stack section is bigger than 4K.
I am unsure if the stack size can/should be that high, but in any case it is causing hard to understand errors.
It could be fixed by either outputting an error or giving a default value to __SEG_SIZE_% !proc::KIND %_% !proc::NAME %_STACK_RGN
The MemMap.h which is generated from the OIL file does not contain memory sections for code and data of ISR category 1.
Both functions tpl_check_stack_pointer and tpl_check_stack_footprint take a ' const tpl_proc_id' parameter instead of a 'const tpl_stack' as required by the caller tpl_check_stack in file autosar/tpl_as_stack_monitor.c :
'''
31 FUNC(void, OS_CODE) tpl_check_stack (
1 CONST(tpl_proc_id, AUTOMATIC) proc_id)
2 {
3 CONSTP2CONST(tpl_stack, AUTOMATIC, OS_APPL_DATA) stack =
4 &(tpl_stat_proc_table[proc_id]->stack);
10 if ((!tpl_check_stack_pointer(stack)) ||
11 (!tpl_check_stack_footprint(stack)))
12 {
'''
File os/tpl_os_task_kernel.h, line 87 :
83 if (TPL_KERN(proc_core_id).need_schedule)
84 {
85 tpl_schedule_from_running(CORE_ID_OR_NOTHING(proc_core_id));
86 DOW_DO(printf("*S* ActivateTask - rescheduling done\n"));
87 SWITCH_CONTEXT(CORE_ID_OR_NOTHING(proc_core_id))
88 }
The macro SWITCH_CONTEXT (defined in os/tpl_os_kernel.h) takes one parameter.
Thus an error may be produced by the compiler (except gcc which does support that case) when CORE_ID_OR_NOTHING returns void.
the function named CHECK_ISR2_CALL_LEVEL_ERROR(result) need to have a second parameter in multicore version.
#if (ISR_COUNT == 0) && (WITH_OS_EXTENDED == YES)
# define CHECK_ISR2_CALL_LEVEL_ERROR(result) \
if (result == (tpl_status)E_OK) \
{ \
result = (tpl_status)E_OS_CALLEVEL; \
}
#endif
/* Any ISR and extended error checking (WITH_OS_EXTENDED == YES). */
#if (ISR_COUNT > 0) && (WITH_OS_EXTENDED == YES)
# define CHECK_ISR2_CALL_LEVEL_ERROR(result) \
if ((result == (tpl_status)E_OK) && \
(tpl_current_os_state() != (tpl_os_state)OS_ISR2)) \
{ \
result = (tpl_status)E_OS_CALLEVEL; \
}
#endif
/* no extended error checking (WITH_OS_EXTENDED == NO). */
#if WITH_OS_EXTENDED == NO
# define CHECK_ISR2_CALL_LEVEL_ERROR(result)
#endif
should be
#if (ISR_COUNT == 0) && (WITH_OS_EXTENDED == YES)
# define CHECK_ISR2_CALL_LEVEL_ERROR(a_core_id, result) \
if (result == (tpl_status)E_OK) \
{ \
result = (tpl_status)E_OS_CALLEVEL; \
}
#endif
/* Any ISR and extended error checking (WITH_OS_EXTENDED == YES). */
#if (ISR_COUNT > 0) && (WITH_OS_EXTENDED == YES)
# define CHECK_ISR2_CALL_LEVEL_ERROR(a_core_id, result) \
if ((result == (tpl_status)E_OK) && \
(tpl_current_os_state(CORE_ID_OR_NOTHING(a_core_id)) != (tpl_os_state)OS_ISR2)) \
{ \
result = (tpl_status)E_OS_CALLEVEL; \
}
#endif
/* no extended error checking (WITH_OS_EXTENDED == NO). */
#if WITH_OS_EXTENDED == NO
# define CHECK_ISR2_CALL_LEVEL_ERROR(a_core_id, result)
#endif
and in the function tpl_terminate_isr2_service at line 215
CHECK_ISR2_CALL_LEVEL_ERROR(result)
should be
CHECK_ISR2_CALL_LEVEL_ERROR(core_id, result)
The file goil/templates/config/api_autosar.oil seems to be an old file since the autosar api is currently described in api.oil. Should we remove it ?
Hi all,
I believe the RAM size listed in memory_map.goilTemplate for the stm32f407 target is wrong.
Page 70 of the datasheet tells us that, starting at address 0x2000 0000, there exists 112KB or RAM followed by another 16KB.
The addresses starting from 0x2002 0000 onwards are reserved.
Indeed, the 192K bytes of SRAM advertised earlier in this document are only accurate if we account for the additional 64KB of SRAM at address 0x1000 0000.
I believe that 192K should read 128K.
I don't know how to use --templates option or set the GOIL_TEMPLATES environment variable. Where shoud i set this variable?
The task's stack does not have a dedicated section in link script, even if the section is correctly set to '.Task_IDLE_TASKStack' in generated files.
The link phase fails on powerpc psim target.
It may have an impact on others targets.
Directly after calling the function “tpl_schedule_from_running()” in the function “tpl_activate_task_service()”, we call the macro “SWITCH_CONTEXT” without verifying the need_switch (line 91 in tpl_os_task_kernel.c).
In case of multicore, calling this macro leads towards “tpl_send_intercore_it” function (line 403 in tpl_os_kernel.h). Therefore, we risk sending an interrupt for context switch to another core without necessarily needing to switch the context, since we don’t verify the need_switch boolean before.
I have a yocto recipe which would allow to deploy Trampoline in Linux Embedded systems.
The task was a success but there was an issue which was not solved as clean as it could be.
The makefile generated by goil contains the following lines:
#############################################################################
#############################################################################
[...]
CC = gcc
[...]
LD = gcc
[...]
AS = gcc
These 3 statements override the environment variables set by yocto to ensure proper cross compiling. The "solution" was to remove such lines from the makefile.
Maybe the generation could be parametrized or make a weak assignment of these variables?
$ goil --target=cortex/armv7/stm32f407/stm32f4discovery/ --templates=/home/lmg/trampoline/goil/templates/ enforcer-example-app.oil
/home/lmg/trampoline/goil/templates/config/cortex/armv7/stm32f407/stm32f4discovery//config.oil:3:5: semantic error #1: PATH is duplicated in file '/home/lmg/trampoline/goil/templates/config/cortex/armv7/stm32f407/stm32f4discovery/config.oil', line 3:8
No warning, 1 error.
Port armv7 is not working anymore since commit
274d8e4f4a042bb502b07da5640f9dfffe676127
Some macro name use common words (states of tasks: READY for instance). It may interfere with other defines (there is a READY register in the Atmel SamD familly).
The examples in the AVR/arduino port do not compile. Default compiler is the one of the host
Currently Resources belong to an OS Application in AUTOSAR SC3 and SC4. This should not be the case according to the 4.2 specification
The pit's watchdog channel interrupt flag is cleared instead of the asking pit's channel while summoning tpl_stop_put function in machines/ppc/multicore/tpl_timers.c
133 FUNC(void, OS_CODE) tpl_stop_pit(
134 VAR(uint8, AUTOMATIC) pit)
135 {
136 /* stops the channel and disable interrupts */
137 *PIT_TCTRL(pit) = (*PIT_TCTRL(pit)) & ~(PIT_TCTRL_TEN | PIT_TCTRL_TIE);
138 /* clear interrupt flag */
139 *PIT_TFLG(TPL_WDG_TIMER) = PIT_TFLG_TIF; //FIXME? pit instead of TPL_WDG_TIMER
140 }
It seems to be impossible to plug many ISR/COUNTER on the same IRQ. Adding the following declaration in the OIL file of any Cortex application triggers the error.
COUNTER testCounter {
SOURCE = SysTick;
MAXALLOWEDVALUE = 3;
TICKSPERBASE = 1;
MINCYCLE = 1;
};
Error is as follow.
lab1/tpl_primary_irq.S: Assembler messages:
lab1/tpl_primary_irq.S:498: Error: symbol `tpl_primary_irq_handler_SysTick' is already defined
lab1/tpl_primary_irq.S:571: Error: symbol `no_save_old_context_SysTick' is already defined
lab1/tpl_primary_irq.S:578: Error: symbol `call_tpl_run_elected_SysTick' is already defined
lab1/tpl_primary_irq.S:598: Error: symbol `no_context_switch_SysTick' is already defined
lab1/tpl_primary_irq.S:632: Error: symbol `tpl_primary_irq_handler_SysTick_exit' is already defined
When using
BUILD = TRUE {
SYSTEM = PYTHON;
}
and generating the files for posix with
goil -t=posix
we get a number of fatal errors.
.../trampoline/os/tpl_os_internal_types.h:30:30: fatal error: tpl_os_std_types.h: No such file or directory
compilation terminated.
Return code: 1
The APPLICATION::ISR attribute contains both ISRS1 and ISRS2, but sometimes it is taken as containing only ISRS2.
root.goilTemplates:685
let CORES := emptymap
if [APPLICATION length] > 0 then
let task_map := mapof TASKS by NAME
let isr_map := mapof ISRS2 by NAME
foreach app in APPLICATION do
let core := [exists app::CORE default (0) string]
let CORES[core]::ISRS := emptylist
(...)
foreach isr_name in exists app::ISR default (emptylist) do
let CORES[core]::ISRS += isr_map[isr_name::VALUE]
end foreach
end foreach
else
let CORES["0"]::TASKS := TASKS
let CORES["0"]::ISRS := ISRS
end if
isr_name should be checked before being added into CORES::ISRS. By the way in monocore we should just add ISRS2 instead of all ISRS.
root.goilTemplates:1129
let process_of_app := app::TASK . app::ISR
# display app::TASK
# display app::ISR
# display process_of_app
let app::PROCESS := process_of_app
This list will be used to produce a table of process id in application_descriptor.goilTemplates, thus producing an error (ISRS1 have no IDs).
The POSTCOMMAND in the python build system can be used to flash the card.
I use openOCD and the full command line would be:
openocd -f board/atmel_samd21_xplained_pro.cfg -c "program blink_exe verify reset exit"
where blink_exe
is the executable file. But the oil description does not allow to add a ":
PREOPTION = "-f board/atmel_samd21_xplained_pro.cfg -c \"program";
When LINKER is set in an oil file, goil generates a makefile that uses the COMPILER's value instead of the LINKER's one.
The python build system call the external unix tools 'rm' and 'mkdir'. There are however a python implementation of these tools.
This could increase the portability (windows…)
In file autosar/tpl_as_app_kernel.c :
374 tpl_dyn_proc_table[proc_id]->activation_allowed = TRUE;
activation_allowed doesn't exists in the tpl_proc structure (defined in tpl_os_kernel.h).
documentation/manual/main.pdf has all references missed.
documentation/manual has a lot of files marked to be "cleaned up before updating to gitHub"
The PSIM (PowerPC simulator) target does not work any more. It crashes at the first 'sc' instruction.
Fresh clone on debian stretch, I encountered the following issues to build example/posix/periodic.oil:
Bonjour,
Je travaille actuellement sur Trampoline avec la cible STM32 F407VG dans le cadre d'un projet à l'ESEO. Je suis confronté à un problème que je n'arrive pas à résoudre depuis plus de 3 ou 4 semaines.
Je travaille sur un code de mise en oeuvre de l'UART avec transmission et réception en interruption. Après avoir testé le code en baremetal, on s'est rendu compte que la STM32 arrive à tenir un baudrate de 115200 sans souci. Quand je teste ce code avec Trampoline, j'ai un HardFault qui se produit et la carte crashe.
Je pense qu'il s'agit d'un problème de temps réel (mavaise préemption ou quelque chose du genre) car le code marche en mode pas à pas. J'obtiens également des comportements différents suivant le nombre de caractères que j'envoie : 6 caractères le code marche, 7 caractères le code ne marche pas, une trentaine de caractères ca marche. Il a quelque chose de louche qui se produit comme si l'arrivée d'un évènement à un moment très précis faisait crasher la carte.
Voici le backtrace que j'obtiens quand la carte crashe :
#0 HardFault_Handler ()
at /home/valentin/I3/PFE/trampoline/machines/cortex/armv7em/stm32f407/handlers_stm32f4xx.c:80
#1 signal handler called
#2 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Le problème survient après 20 à 30 envois correctement effectués. Il y a un appel sur pointeur NULL a priori.
Le problème vient peut-être d'une mauvaise utilisation de Trampoline de ma part. J'ai protéger les sections critiques par DisableAllInterrupts() / EnableAllInterrupts() (sauf celle de l'ISR qui ne peut pas être préemptée). Est ce bien ces fonctions que je dois utiliser pour protéger les sections critiques ?
Y a t'il des priorités spéciales à mettre pour les interruptions NVIC ? J'ai lu qu'il avait des problèmes de priorités entre la STM32 et l'OS avec d'autres RTOS différent de Trampoline. Le problème pourrait peut-être venir de là.
Voici mon code avec l'executable et le .map après compilation
uart_test_4.zip
Valentin BESNARD
We should test if there exists a post command in configuration files otherwise the build.py script is built with:
if make.errorCount() == 0:
This generates an error
While trying to setup a lightweight docker container for compiling & flashing or Arduino Uno specifically, I've encountered this issue after pulling TrampolineRTOS last version :
./make.py
../../../../machines/avr/tpl_machine.c: In function 'tpl_init_context':
../../../../machines/avr/tpl_machine.c:63:18: error: 'CallTerminateISR2' undeclared (first use in this function)
AVR_PUSH((u16)(CallTerminateISR2) & 0xFF)
By the way, I hope very much that you are OK with my work, I solely intend to create a docker container to be run as a compiler, for the purpose of the "Systems & Networks" course at the "Ecole des Mines de Nantes".
Docker container repo : https://github.com/guillaume-chs/trampuino
My fork of TrampolineRTOS : https://github.com/guillaume-chs/trampoline-for-docker-trampuino
Cheers,
Guillaume !
Commit 1c6896b#diff-226ddbef4ee95a20247f543d5afccafe in root.goilTemplate breaks posix port. Posix port does not use the SOURCE
attribute for IRQ. Computation based on the target specific OIL attributes should be done in a target specific template
Suppress from machine system calls and irq handling:
push {lr}
...
pop {lr}
Optimize use of registers from machine system calls and irq handling:
sp register is saved into r5 and then r5 is used all along the handlers.
This useless; Don't save sp, and use it without modifying it.
Study whether or not r4 is useful. We shall use either r0, r1, r2 at the very end of handler because
they will be restored on return.
Adding a TRACE section to the OS config section as follows
TRACE = TRUE {
METHOD = FILE { NAME = "trace"; };
FORMAT = xml;
};
returns the following error:
.../goil/templates/log/trace_description.goilTemplate:4:16: error #1: found the 'do' keyword, expected:
- the 'in' keyword
No warning, 1 error.
while generating the project with goil.
In OSEK OS 2.2.3 specification, section 13.2.4 (page 54) specifies the constants of type TaskStateType. Theses constants are RUNNING, WAITING, READY, SUSPENDED and INVALID_TASK. Recent commit (22fb1d9) breaks that.
Another way to solve the conflict with SAM D21 register fields name should be used.
The functional test alarms_s10 calls the ActivateTask service in an alarm callback (function test_callback_instance, file callback_instance.c). This is forbidden by AUTOSAR, we should call instead directly the activate task service. Doing so will prevent us from doing a context switch (good thing !), however it'll change the tests orders...
I'm moving away this test from the test sequence for now, i'll check into it later.
Would it be possible to port this OS to the STM8? What would have to be done?
Philipp
When adding a category in goil/templates/config/kernel.oil , the python build system fails because it can not find the corresponding header files.
I would like to be able to use a library (U8glib) in a simple project.
So I have imported this lib in lib/U8glib
and included it #include "../lib/U8glib/U8glib.h"
(I have a src/screenJoyStick.h
).
But, I get some errors :
...
[100%] Linking trampuinoScreenJoyStick
build/src/screenJoyStick.cpp.o: In function `U8GLIB::write(unsigned char)':
screenJoyStick.cpp:(.text._ZN6U8GLIB5writeEh[U8GLIB::write(unsigned char)]+0xe): undefined reference to `u8g_DrawGlyph'
build/src/screenJoyStick.cpp.o: In function `periodicTask_function':
screenJoyStick.cpp:(.text.periodicTask_function+0x12): undefined reference to `u8g_Begin'
screenJoyStick.cpp:(.text.periodicTask_function+0x1a): undefined reference to `u8g_FirstPage'
build/src/screenJoyStick.cpp.o: In function `_GLOBAL__sub_I_u8g':
screenJoyStick.cpp:(.text.startup._GLOBAL__sub_I_u8g+0x28): undefined reference to `u8g_dev_st7565_nhd_c12864_sw_spi'
screenJoyStick.cpp:(.text.startup._GLOBAL__sub_I_u8g+0x2a): undefined reference to `u8g_dev_st7565_nhd_c12864_sw_spi'
screenJoyStick.cpp:(.text.startup._GLOBAL__sub_I_u8g+0x2e): undefined reference to `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
collect2: error: ld returned 1 exit status
Return code: 1
I guess this errors are linking errors. The lib should not be included in compilation and linking process.
@guillaume-chs has fixed this here guillaume-chs@06b9571
This works but, update goil template to add a library support is not really extensible.
Do you have a solution to specify lib
directory in goil configuration file ?
I have the same problem if I split my C++ code in classes :
Nothing to make.
[ 5%] Compiling /path/to/trampoline/os/tpl_os_kernel.c
[ 11%] Compiling /path/to/trampoline/os/tpl_os_timeobj_kernel.c
[ 17%] Compiling /path/to/trampoline/os/tpl_os_action.c
[ 23%] Compiling /path/to/trampoline/os/tpl_os_error.c
[ 29%] Compiling /path/to/trampoline/os/tpl_os_os_kernel.c
[ 35%] Compiling /path/to/trampoline/os/tpl_os_os.c
[ 41%] Compiling /path/to/trampoline/os/tpl_os_interrupt_kernel.c
[ 47%] Compiling /path/to/trampoline/os/tpl_os_task_kernel.c
[ 52%] Compiling /path/to/trampoline/os/tpl_os_resource_kernel.c
[ 58%] Compiling /path/to/trampoline/os/tpl_os_alarm_kernel.c
[ 64%] Compiling src/screenJoyStick.cpp
[ 70%] Compiling screenJoyStick/tpl_app_config.c
[ 76%] Compiling screenJoyStick/tpl_dispatch_table.c
[ 82%] Compiling screenJoyStick/tpl_invoque.S
[ 88%] Compiling /path/to/trampoline/machines/avr/tpl_machine.c
[ 94%] Compiling /path/to/trampoline/machines/avr/arduino/main.cpp
[100%] Linking trampuinoScreenJoyStick
build/src/screenJoyStick.cpp.o: In function `setup':
screenJoyStick.cpp:(.text.setup+0x4): undefined reference to `JoyStick::getJoyStickPosition()'
build/src/screenJoyStick.cpp.o: In function `_GLOBAL__sub_I_js':
screenJoyStick.cpp:(.text.startup._GLOBAL__sub_I_js+0x8): undefined reference to `JoyStick::JoyStick(unsigned int)'
collect2: error: ld returned 1 exit status
Return code: 1
To generalize my question : do you have a solution to specify others C++ scripts in goil configuration file ?
Thanks for your great work!
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.