Search found 21 matches

by stertingen
Sat Nov 13, 2021 5:03 pm
Forum: Bug Reports
Topic: r13804 breaks C++ builds Topic is solved
Replies: 12
Views: 9779

Re: r13804 breaks C++ builds Topic is solved

Giovanni wrote:Hi,

I removed the syscalls_cpp.* files (in trunk), now the wrapper includes the normal syscalls.c file. Could you retest the current wrapper? my demo is not failing but something could still be missing.

Giovanni


When using virtual functions in C++, __cxa_pure_virtual() is needed.
by stertingen
Wed Aug 25, 2021 8:27 pm
Forum: Bug Reports
Topic: r13804 breaks C++ builds Topic is solved
Replies: 12
Views: 9779

Re: r13804 breaks C++ builds Topic is solved

Removed the duplicate functions from syscalls_cpp.cpp.
by stertingen
Sun Nov 15, 2020 2:58 pm
Forum: Small Change Requests
Topic: Ignore "-Wcast-align" warnings
Replies: 6
Views: 6301

Re: Ignore "-Wcast-align" warnings

I wonder if there's a way to tell the compiler "this pointer is correctly aligned" other than making it a uint32_t* (or stkalign_t* or ...). The only way I see to do this is by declaring it as uint32_t* and cast it down to uint8_t* if byte-wise operations are needed. Actually, there is __...
by stertingen
Sun Nov 15, 2020 11:17 am
Forum: Small Change Requests
Topic: Ignore "-Wcast-align" warnings
Replies: 6
Views: 6301

Re: Ignore "-Wcast-align" warnings

I wonder if there's a way to tell the compiler "this pointer is correctly aligned" other than making it a uint32_t* (or stkalign_t* or ...). The only way I see to do this is by declaring it as uint32_t* and cast it down to uint8_t* if byte-wise operations are needed. Actually, there is __...
by stertingen
Sat Nov 14, 2020 8:59 pm
Forum: Small Change Requests
Topic: Ignore "-Wcast-align" warnings
Replies: 6
Views: 6301

Re: Ignore "-Wcast-align" warnings

Hi, In general OK but the use of memcpy() would impact performance in some pretty critical places, see USB code, that code implicitly relies on pointers being correctly aligned. Giovanni GCC is smart enough to replace calls to memcpy() with other copy operations when appropriate with -O2. I looked ...
by stertingen
Fri Nov 13, 2020 4:26 pm
Forum: Small Change Requests
Topic: Ignore "-Wcast-align" warnings
Replies: 6
Views: 6301

Re: Ignore "-Wcast-align" warnings

Some thoughts on how to prevent unaligned memory access: Perform pointer arithmetic on maximum alignment Instead of uint32_t * x = (uint32_t)((uint8_t *)y + n) do uint32_t * x = (uint32_t *)y + n / sizeof (uint32_t) So we guarantee that x has the correct alignment. Of course we have to ensure that (...
by stertingen
Thu Oct 29, 2020 6:16 pm
Forum: Small Change Requests
Topic: Ignore "-Wcast-align" warnings
Replies: 6
Views: 6301

Ignore "-Wcast-align" warnings

Using GCC, I have enabled the "-Wcast-align" warnings enabled. Unfortunately, 1. the ChibiOS code performs such casting operations which increase the required alignment and 2. the ChibiOS Makefile structure does not easily allow to disable warnings for ChibiOS source files while keeping th...
by stertingen
Tue Aug 18, 2020 5:28 pm
Forum: Bug Reports
Topic: ADC dual mode check incorrect in STM32H7 Topic is solved
Replies: 7
Views: 21214

Re: ADC dual mode check incorrect in STM32H7 Topic is solved

Giovanni wrote:I could update the headers but there is the risk to break something else.

Giovanni


I think it would be easier to revert the regression fix that somehow slipped back to ChibiOS 19. (https://github.com/ChibiOS/ChibiOS/comm ... 83b60f6689)
by stertingen
Tue Aug 18, 2020 5:20 pm
Forum: Bug Reports
Topic: ADC dual mode check incorrect in STM32H7 Topic is solved
Replies: 7
Views: 21214

Re: ADC dual mode check incorrect in STM32H7 Topic is solved

Sorry to necrobump this, but the commit containing said fix ( dda9f7b8d4 on GitHub ) seems to do more that the patch submitted by piers and breaks the build. To be concrete, the file now uses the defines ADC_ISR_ADRDY instead of ADC_ISR_ADRD, ADC_IER_OVRIE instead of ADC_IER_OVR and ADC_IER_AWD1IE i...

Go to advanced search