Sample code doesn't work on hardware

Bug #1387906 reported by Traumflug
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Opinion
Wishlist
Terry Guo

Bug Description

Perhaps you remember my recent question and the discussion about actually using this toolchain: https://answers.launchpad.net/gcc-arm-embedded/+question/256332

Now, here comes the code.

I took the retarget sample code and made it actually working in a usable/visible fashion on real hardware using an unmodified clone of the mbed Git repository. Code is as tidy and simple as (I think) reasonably possible.

Makefile got quite a bit bigger, of course. As mbed has no makefiles and apparently no mapping mechanism for coodinating all the target MCU specific locations, it requires some six hardcoded paths. Still I think that's doable by a person capable of navigating a file system. Directory names in mbed are pretty obvious.

I think this would be a very valuable addition to the sample code, if only to offer people a bridge for continueing after building/installing this toolchain.

Revision history for this message
Traumflug (mah-jump-ing) wrote :
Terry Guo (terry.guo)
Changed in gcc-arm-embedded:
assignee: nobody → Terry Guo (terry.guo)
Revision history for this message
Terry Guo (terry.guo) wrote :

For various reasons, I don't think we will support this in short term. We will continue to rely on CMSIS and MBED to handle stuff related to real hardware.

Changed in gcc-arm-embedded:
status: New → Opinion
importance: Undecided → Wishlist
Revision history for this message
Jonathan Farmer (jrfarmer-com) wrote :

Traumflug,

I was able to get output retargeting to work without issue (i.e. _write worked just fine), but I never was able to get input retargeting to work (i.e. _read).

Can you please describe how the serial_getc() behaves? Does this method block (i.e. busy-wait) until a character is received on the serial port?

Revision history for this message
Traumflug (mah-jump-ing) wrote :

serial_getc() is code coming with MBED and also target dependent. For LPC11xx it blocks with busy-wait. There's also serial_readable() to check wether a character is available.

If it doesn't work for you you might want to look up serial_api.c for your target and look what's there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.