Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: EMT Closure Available Features #3

Open
rei-vilo opened this issue Nov 22, 2017 · 0 comments
Open

Feature Request: EMT Closure Available Features #3

rei-vilo opened this issue Nov 22, 2017 · 0 comments

Comments

@rei-vilo
Copy link
Member

rei-vilo commented Nov 22, 2017

As issue energia/msp432-core#40 concerns all EMT-supported boards, maybe this repository is more suited.

Here's an example:

MSP432 EMT on Energia 18 fails, even for the blinky example.

"/Users/ReiVilo/Library/Energia15/packages/energia/tools/arm-none-eabi-gcc/6.3.1-20170620/bin/arm-none-eabi-gcc" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs -g -Dxdc_target_types__=gnu/targets/arm/std.h -Dxdc_target_name__=M4F -Dxdc_cfg__xheader__="configPkg/package/cfg/energia_pm4fg.h" -DTARGET_IS_MSP432P4XX -DBOARD_MSP_EXP432P401R -Dxdc__nolocalstring=1 -D__MSP432P401R__ -DCORE_VERSION=380 -c -g -Os -w -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -DF_CPU=48000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP432P401R -DENERGIA_ARCH_MSP432 "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/msp432" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/driverlib/MSP432P4xx" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/driverlib" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/inc" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/inc/CMSIS/" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/msp432" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/driverlib/MSP432P4xx" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/driverlib" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/inc" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system/inc/CMSIS/" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/system" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432" "-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/variants/MSP_EXP432P401R" "/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/random.c" -o "/var/folders/px/cyfvtr757lqg0yp_cv9j79jh0000gn/T/build4eb92306ca433564726b296e7628dfa5.tmp/core/ti/runtime/wiring/random.c.o"
/Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/random.c:83:6: error: conflicting types for 'srandom'
 void srandom(unsigned long seed)
      ^~~~~~~
In file included from /Users/ReiVilo/Library/Energia15/packages/energia/tools/arm-none-eabi-gcc/6.3.1-20170620/arm-none-eabi/include/stdlib.h:11:0,
                 from /Users/ReiVilo/Library/Energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/random.c:42:
/Users/ReiVilo/Library/Energia15/packages/energia/tools/arm-none-eabi-gcc/6.3.1-20170620/arm-none-eabi/include/stdlib.h:257:7: note: previous declaration of 'srandom' was here
 _VOID _EXFUN(srandom,(unsigned));
       ^
exit status 1

MSP432 EMT on Energia 19 succeeds to compile the SwitriggerLibrary example.

capture 2017-11-17 a 21 25 32

Suggested solution

Add to the TI-RTOS closure a list of available and implemented elements, e.g.

#define EMT_HAS_SWI 
#define EMT_HAS_TASKS
#define EMT_HAS_EVENT
#define EMT_HAS_SEMAPHORE
#define EMT_HAS_MAILBOX
#define EMT_HAS_TIMER
#define EMT_HAS_CLOCK

Two options:

  • Either use 1 and 0 to flag the implementation of an element...
#define EMT_HAS_SWI 1 // 1 = SWI implemented, 0 = SWI not implemented

...to be tested with #if (EMT_HAS_SWI == 1) ... #endif

  • Or define the macro only if the implementation is done...
#define EMT_HAS_SWI // define = SWI implemented
// #define EMT_HAS_SWI // comment = SWI not implemented

...to be tested with #if defined(EMT_HAS_SWI) ... #endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant