Yes, that would be my suggestion.  I'm happy to submit a patch myself.  Note 
that both 'ch' and 'ch_debug' are actually required for successful detection, 
which is good - I'd be nervous about relying on the presence of a single 
two-character symbol for the detection (false positives would be more likely).


---

** [tickets:#121] ChibiOS rtos detection fails with LTO enabled**

**Status:** new
**Milestone:** 0.9.0
**Labels:** rtos chibios 
**Created:** Tue Mar 08, 2016 11:36 AM UTC by Andy Pomfret
**Last Updated:** Tue Mar 08, 2016 11:36 AM UTC
**Owner:** nobody


OpenOCD relies on the symbol 'chSysInit' being present to identify ChibiOS for 
rtos thread support.  However, if link-time optimisation (LTO) is enabled for 
the ChibiOS build, as it is by default, this function may be inlined and its 
symbol dropped from the linked binary.

The symbols 'ch' and 'ch_debug' are also required (currently if 'ch' is found 
and 'ch_debug' is not, recognition of ChibiOS will fail with an info message) 
so the chances of a false positive would be resonably small even if the 
reliance on chSysInit were removed.

To recreate: Fresh build of OpenOCD 0.9.0, fresh build of the STM32F4DISCOVERY 
demo project from ChibiOS 14.1.4 using default settings.  OpenOCD is unable to 
identify ChibiOS because the chSysInit symbol is missing from the binary.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to