[PATCH] libdebugger: Fix ARMv7-M with -O0

Joel Sherrill joel at rtems.org
Tue Oct 20 16:00:16 UTC 2020


On Tue, Oct 20, 2020 at 10:50 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 02/04/2020 09:09, Sebastian Huber wrote:
>
> > On 02/04/2020 08:46, Chris Johns wrote:
> >
> >> On 2020-04-02 16:53, Sebastian Huber wrote:
> >>> Hallo Chris,
> >>> On 21/03/2020 07:45, Sebastian Huber wrote:
> >>>> On 20/03/2020 22:23, Chris Johns wrote:
> >>>>>> On 20 Mar 2020, at 4:49 pm, Sebastian Huber
> >>>>>> <sebastian.huber at embedded-brains.de> wrote:
> >>>>>>
> >>>>>> On 20/03/2020 05:15, Chris Johns wrote:
> >>>>>>
> >>>>>>> On 19/3/20 7:52 pm, Sebastian Huber wrote:
> >>>>>>>> The ARMv7-M architecture has no CP-15.  The inline assembly for
> >>>>>>>> the
> >>>>>>>> CP-15 access leads to assembler errors if compiled with -O0.
> >>>>>>> I would like to understand this one in detail to see why there
> >>>>>>> is cp15 in the build.
> >>>>>> In ARMv7-M the system registers are memory mapped.
> >>>>>>
> >>>>>> If I compile a Cortex-M based BSP with -O0, then I get:
> >>>>>>
> >>>>> BSP?
> >>>> For example the atsamv BSP.
> >>> could you please have a look at this. Being able to build with -O0
> >>> is quite helpful during BSP development.
> >>
> >> Is this important for 5.1.0?
> >
> > It is not absolutely necessary, but I regularly had to fix this
> > locally. We have several ARMv7-M based BSPs. This was my first attempt
> > to address this issue:
> >
> > https://lists.rtems.org/pipermail/devel/2019-February/024914.html
> >
> We work no on another Cortex-M based BSP and building with -O0 would be
> really nice.


How about -Og instead? Enable all optimizations which do not negatively
impact debugging?

--joel

>

_______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201020/91d33567/attachment-0001.html>


More information about the devel mailing list