Closed RonEld closed 4 years ago
To resolve this, either add US_TICKER DEVICE in
`targets.jsonor add#if DEVICE_USTICKER
in the targets' us_ticker.c file
thanks for the report. @RonEld Can you send a patch to Mbed OS fixing this us ticker?
@0xc0170 I don't mind doing it, but I don't have the target to test. In addition, I don't know what's the best solution for this:
targets.json
1
means the target has us ticker, which I don't know
2
means not using the us ticker, in case there is.
Shouldn't this be done best by the partner?
add#if DEVICE_USTICKER` in the targets' us_ticker.c file
This should be OK to do without target testing as long as build is all good for this target. For the 1st, we would need target testing.. However if us ticker was ported and we introduced this new define few months back, I dont see a reason why not add it - is the target usable without us ticker? It's not.
cc @toyowata would you be able to test us ticker for this platform?
@0xc0170 @RonEld
I just quick test for this platform. My test branch is here: https://github.com/toyowata/mbed/tree/test_lpc11u35
I did...
USTICKER
for the target#if DEVICE_USTICKER
macro in the us_ticker.c(mbed-venv) 16:37:35 mbed-os-example-blinky-baremetal $ mbed compile -m lpc11u35_401 -t arm
[mbed] Working path "/Users/toywat01/test/nxp/mbed-os-example-blinky-baremetal" (program)
Building project mbed-os-example-blinky-baremetal (LPC11U35_401, ARMC6)
# snip
Link: mbed-os-example-blinky-baremetal
[Warning] @0,0: L3912W: Option 'legacyalign' is deprecated.
[Warning] @0,0: L6320W: Ignoring --keep command. Cannot find argument 'os_cb_sections'.
[Error] @0,0: L6218E: Undefined symbol _scanf_mbtowc (referred from BUILD/LPC11U35_401/ARM/mbed-os/platform/source/ATCmdParser.o).
Warning: L3912W: Option 'legacyalign' is deprecated.
Warning: L6320W: Ignoring --keep command. Cannot find argument 'os_cb_sections'.
Error: L6218E: Undefined symbol _scanf_mbtowc (referred from BUILD/LPC11U35_401/ARM/mbed-os/platform/source/ATCmdParser.o).
Finished: 0 information, 2 warning and 1 error messages.
[ERROR] Warning: L3912W: Option 'legacyalign' is deprecated.
Warning: L6320W: Ignoring --keep command. Cannot find argument 'os_cb_sections'.
Error: L6218E: Undefined symbol _scanf_mbtowc (referred from BUILD/LPC11U35_401/ARM/mbed-os/platform/source/ATCmdParser.o).
Finished: 0 information, 2 warning and 1 error messages.
[mbed] ERROR: "/Users/toywat01/mbed-venv/bin/python" returned error.
Code: 1
Path: "/Users/toywat01/test/nxp/mbed-os-example-blinky-baremetal"
Command: "/Users/toywat01/mbed-venv/bin/python -u /Users/toywat01/test/nxp/mbed-os-example-blinky-baremetal/mbed-os/tools/make.py -t arm -m lpc11u35_401 --source . --build ./BUILD/LPC11U35_401/ARM"
Tip: You could retry the last command with "-v" flag for verbose output
---
I still got link erros, so I changed:
uARM
to ARM
Now, I got no link errors. Then, I copied the mbed-os-example-blinky-baremetal binary to the target and got runtime error below:
++ MbedOS Fault Handler ++
FaultType: HardFault
Context:
R0 : 00000013
R1 : 00003355
R2 : 00000002
R3 : 00000002
R4 : 00000001
R5 : 40018004
R6 : 00000000
R7 : 0000399F
R8 : 19494B1A
R9 : 10000140
R10 : 000039C0
R11 : 000039C0
R12 : 00000000
SP : 10001F88
LR : 00003335
PC : 00001F80
xPSR : 21000000
PSP : 7821E644
MSP : 10001F68
CPUID: 410CC200
Mode : Thread
Priv : Privileged
Stack: MSP
-- MbedOS Fault Handler --
++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x1F80
Error Value: 0x10000180
For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=LPC11U35_401
-- MbedOS Error Info --
Note that -t gcc_arm
binary doesn't crash and works as expected (LED blinks every 500ms) on the target.
The LPC11U35_401 is Mbed 2 only target. There should be done proper porting/testing for Mbed OS 5 even baremetal profile?
The LPC11U35_401 is Mbed 2 only target. There should be done proper porting/testing for Mbed OS 5 even baremetal profile?
baremetal should equal to mbed 2 (at least if we are concerned here about ARM toolchain). It should work.
Thanks for testing,the target is broken and no longer builds :/
Not even regular test builds? This might move to Mbed OS and should be fixed.
@toyowata Thanks for testing.
Perhaps the platform doesn't support usticker, and this is why USTICKER
doesn't exist in targets.json
?
In this case, I think we should only keep the #if DEVICE_USTICKER
, which will disable usticker, pass link, but I am not sure on runtime though
@RonEld
In this case, I think we should only keep the #if DEVICE_USTICKER , which will disable usticker, pass link, but I am not sure on runtime though
I removed the USTICKER
feature from the target and it doesn't crash in runtime (ARMC6 build). LED blinks as expected timing and no crash report. My working branch is here: https://github.com/toyowata/mbed/tree/test_lpc11u35
@0xc0170
Not even regular test builds? This might move to Mbed OS and should be fixed.
By adding "5" in the release_versions
enables greentea test build, but I got link errors because the target doesn't have enough RAM for all test cases (maybe, linker script files should be updated for the target).
By adding "requires": ["bare-metal"]
in the mbed_app.json for test build with above, I got compile errors (not fond headers under the greentea-client).
@toyowata How shall we fix this issue? using your test branch and integrate it via PR to Mbed OS?
Internal Jira reference: https://jira.arm.com/browse/IOTCORE-1419
Building the example for LPC11U35_401 with toolchain ARMC6 results in the following build error:
I believe the
Undefined symbol _scanf_mbtowc
error has been fixed in https://github.com/ARMmbed/mbed-os/pull/10704 and thembed-os.lib
requires updating to latest versoin, once next Mbed OS release is published. I believe errorUndefined symbol us_ticker_irq_handler
is because the targets.json doesn't have deviceUS_TICKER
forLPC11U35_401
. To resolve this, either addUS_TICKER
DEVICE in`targets.json
or add#if DEVICE_USTICKER
in the targets' us_ticker.c fileNote that same errors happen with
ARM
toolchain which is mentioned as supported toolchainThis was reported in the forum