Search found 77 matches

by hazelnusse
Tue May 28, 2013 3:03 am
Forum: General Support
Topic: C++ local stack allocated instance destructor
Replies: 5
Views: 5787

Re: C++ local stack allocated instance destructor

chThdExit() is equivalent to return but this does not include finalization code of course.

To me this means they are not equivalent. Equivalent would mean the exact same cpu instructions will be executed, but since destructors will not be called when using chThdExit(), the code with return will ...
by hazelnusse
Mon May 27, 2013 10:20 pm
Forum: General Support
Topic: C++ local stack allocated instance destructor
Replies: 5
Views: 5787

Re: C++ local stack allocated instance destructor

If chThdExit() never returns, and the compiler doesn't know this (which it seems like it will not), doesn't this imply that the cleanup code for user defined types (i.e., class destructors) will not be run, since the compiler implicitly places this code at the end the function body? So return ...
by hazelnusse
Sat May 25, 2013 5:32 pm
Forum: General Support
Topic: C++ local stack allocated instance destructor
Replies: 5
Views: 5787

C++ local stack allocated instance destructor

If I allocate an instance of a C++ class type on the stack inside of a thread function, it seems like the destructor for this instance will not be executed if the thread function calls chThdExit() instead of actually returning. The compiler won't know that the no instructions will be executed after ...
by hazelnusse
Fri Mar 29, 2013 1:25 am
Forum: General Support
Topic: Terminating a thread that is using f_write() from FatFS
Replies: 1
Views: 2526

Terminating a thread that is using f_write() from FatFS

I have a thread that is running a loop at 200Hz and in that loop it periodically calls f_write(). This is the only thread to use any of the FatFs calls, and this thread has the highest priority. While the thread is running, the system is responsive (the shell works). When I invoke a shell command to ...
by hazelnusse
Fri Mar 29, 2013 12:08 am
Forum: STM32 Support
Topic: SDC default clock speed for STM32F4
Replies: 2
Views: 3853

SDC default clock speed for STM32F4

I have a Olimex STM32-H407 dev board which has an STM32F407 chip on it. I'm using the SD card and FatFS to write data to the card. I have been search the source tree but am unable to find out what the SDIO clock speed (SDIO_CK in RM0090) is set to by default. My reading of the documentation is that ...
by hazelnusse
Wed Mar 13, 2013 6:31 pm
Forum: General Support
Topic: shell halting when code size gets too big
Replies: 13
Views: 9719

Re: shell halting when code size gets too big

Giovanni,
I doubled my stack size from 2048 to 4096 to 8192, finally to 32768 (riduculous, I know), and this did not fix it. It isn't obvious to me why the stack size would be an issue if the unhandled exception is occuring even with calls to simple things like help or a do nothing command that ...
by hazelnusse
Wed Mar 13, 2013 11:30 am
Forum: General Support
Topic: shell halting when code size gets too big
Replies: 13
Views: 9719

shell halting when code size gets too big

I am working from one of the demos, modified to add some extra shell commands. One of my shell commands results in a relatively large bit of code (~25kb) getting added to my project. Most of this is from static data associated with a lookup table, all of it statically allocated. Anyway, when I have ...
by hazelnusse
Sat Jan 19, 2013 11:27 pm
Forum: General Support
Topic: crt0.c & CORTEX_USE_FPU
Replies: 5
Views: 5506

Re: crt0.c & CORTEX_USE_FPU

This fixes the compilation issue. I will test on Monday to make sure it runs fine on my hardware.

Thanks for the fast fix!

Luke
by hazelnusse
Thu Jan 17, 2013 8:40 am
Forum: General Support
Topic: crt0.c & CORTEX_USE_FPU
Replies: 5
Views: 5506

Re: crt0.c & CORTEX_USE_FPU

Great, I look forward to testing it out.

Luke
by hazelnusse
Thu Jan 17, 2013 6:04 am
Forum: General Support
Topic: crt0.c & CORTEX_USE_FPU
Replies: 5
Views: 5506

Re: crt0.c & CORTEX_USE_FPU

A simpler way to recreate this bug is to do:

Code: Select all

make USE_FPU=yes

in any of the ARMCM4 demos.

Luke