This is my first time building a real application with ChibiOS. I'm really liking the architectures and layout, but had a few small questions come up as I worked through the basics.
Heap size:
From what I've read, it looks like you can use the default heap allocator if CH_CFG_USE_HEAP has been set to true and you put a NULL pointer for the heap.
If I may ask, does anyone know what the limits of the default heap size? The size of the main stack is defined in the make file (USE_PROCESS_STACKSIZE). Does the heap grow until it hits one of the stacks or statically defined memory objects or does it have a fixed size limit defined somewhere?
C++11:
I was hoping to use C++11 as the default language for this project. I was able to get an example to run and use auto by using a .cpp file for main and adding the -std=c++11 option to USE_CPPOPT. If I may ask, are there any downsides or "gotchas" that would prevent this from working reliably for my projects?
THD_WA_SIZE in ChibiOS v3:
In the example for dynamic thread creation in ChibiOS 2.8, a call like the one below would be used:
Code: Select all
thread_t *thread1 = chThdCreateFromHeap(NULL, THD_WA_SIZE(128), NORMALPRIO, &thread1Function, NULL);
However, the THD_WA_SIZE macro doesn't seem to be defined in v3 and I can't seem to find where it should be from looking in the 2.8 code. It does work if I just specify manually, but the posts I read seemed to indicated that was bad practice because the working area will be larger than the given 128 bytes. If I may ask, does anyone know what the v3 replacement for the macro would be?
Thanks,
Charlie West