Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
2 votes
0 answers
82 views

Embedded C++ - Header-only library optimization level

I mainly develop firmware for ARM Cortex M using gcc and I am migrating from C to C++ and even though I am overall happy with the transition, there are some things that I just can't get right. ...
sblanco's user avatar
  • 31
0 votes
0 answers
46 views

TensorFlow Lite makefile for Texas Instruments CC1352P7 Board with ARM Cortex M4F multiprotocol

I am trying to use tensorflow lite to deploy a model on MCU Texas Instruments CC1352P7 having ARM Cortex M4F protocol. However, when trying to generate the makefile in my command line, I get the ...
RikkiS's user avatar
  • 91
0 votes
1 answer
309 views

Cortex-M4: atomic read and write of uint64_t

I read several times, that Cortex-M4 does not support LDRD/STRD instructions. But when I try with gcc 13.2 I get these instructions. E.g. x3 = x1 for uint64_t gives: ldrd r2, [r0] @ x1.0_1, ...
wimalopaan's user avatar
  • 5,292
1 vote
0 answers
89 views

Cortex-M4: LDRD or VLDR.64 to move uint64_t

The following code produces volatile uint64_t x1; volatile uint64_t x3; int main(){ while(true) { x3 = x1; } } uses LDRD/STRD to transfer the double word. In outher situations, where ...
wimalopaan's user avatar
  • 5,292
2 votes
1 answer
229 views

How to write atomic RMW-sequences on Cortex-M4 in C++

In the following example are 4 versions to atomically increment (or use other form of rmw-statements) on a variable a1 or a2 (depending on the version). The variable a1 or a2 may be shared with some ...
wimalopaan's user avatar
  • 5,292
2 votes
2 answers
354 views

Floating point subtraction using sign bit flip and add

Taking double subtraction code from this question Replacing __aeabi_dsub to save space (-flto issues) and adjusting it slightly (both for double and float values): extern "C" double ...
Daniel Jour's user avatar
  • 16.1k
0 votes
1 answer
1k views

Undefined reference to _fini and __dso_handle when compiling c++ for arm cortex M3

I am trying to compile the c++ code for arm cortex-m3. When I use static variable of any class, which has custom destructors (like std::function<> for example), I get the following errors: /...
Quest's user avatar
  • 2,813
0 votes
1 answer
209 views

Casting to double pointer on Arm Cortex-M3

I am using an Arm Cortex-M3 processor. I receive binary data in an unsigned char array, which must be cast into a suitable variable to be used for further computation: unsigned char gps[24] = { 0xFA, ...
Kartik Kanugo's user avatar
0 votes
2 answers
208 views

Fastest way of resizing (rescaling) a 1D vector by an arbitrary factor

I have the following code that does the resizing of a 1D vector with nearest neighbor interpolation in a similar fashion you'd also resize an image. Another term would be resampling, but there seems ...
Max Walczak's user avatar
0 votes
0 answers
99 views

Arm Cortex G++ I am writing a edma serial driver for a cortex M7+ I am trying to use c++, want to know if it is possible

I am writing a cortex M7+ edma serial driver. I want to do it in c++ I have it working in c from the examples from the manufacturer. One of the problems I am having a few problems. I know how to call ...
tbandtg's user avatar
  • 29
0 votes
1 answer
395 views

ARM ACLE support in gcc

I'm writing an application where I'd like to detect whether a function is called from an ISR. Ignoring the specifics of the application it is targeting a Cortex M0. In an effort to avoid having to use ...
Ohunter's user avatar
  • 363
0 votes
1 answer
602 views

exceptions not working cross compiling with clang and cmake for arm cortex m4, and "got" section is generated

I have been trying lately to compile firmware with Clang and CMake, using Toolchain files, for C++. I can get it normally working without exceptions. A problem arises when I use exceptions. LLVM ...
K. Koovalsky's user avatar
3 votes
0 answers
272 views

GCC, GDB, and is_stmt

I'm using GNU Arm Embedded Toolchain 10.3 to cross-compile for a Cortex-M0+ target, and using the accompanying GDB to debug. I want to set a breakpoint on the following line of code: if (...
Jeremy's user avatar
  • 5,231
15 votes
5 answers
2k views

Dynamic memory allocation in STD

Working a lot with microcontrollers and C++ it is important for me to know that I do not perform dynamic memory allocations. However I would like to get the most out of the STD lib. What would be the ...
Bart's user avatar
  • 1,510
1 vote
2 answers
1k views

How to create C++ task class (a worker) with Keil's CMSIS RTOS2 thread and timer C funtions?

How do I map C++ class concept to C functions osTimerNew() and osThreadNew() ? How to use a C++ member function as a Keil RTOS2 osTimerNew() and osThreadNew() callback implementation. Thanks
francek's user avatar
  • 502

15 30 50 per page
1
2 3 4 5