bnrtos wrote on Thursday, April 21, 2011:
Hi Dave, thanks for the reply.
- Yes, I’ve got traps on all the xTaskCreate() calls - no apparent problem there.
- I’m using heap_2 and added the malloc failed hook/define but it doesn’t seem to be getting hooked.
- I’m not specifying a linker script so MPLAB is defaulting ot the standard script for my PIC32.
Basically, I had a huge RTOS queue (40960 bytes) and found QueueSendToBack seemed a bit expensive so I was trying to replace it with my own circular buffer/array. I’ve made all the necessary changes, eliminated the queue, and defined my array buffer. Once I increase the size of my array past a couple hundred bytes, the tasks don’t seem to run properly. I know that’s a bit vague and it could be a multitude of things - the point is, I’m not *using* the array in my code yet… just allocating/defining it.
If it’s under a certain size, everything works fine; if not, I don’t get any exceptions (that I’m aware of) but things are not fine.
If I could create a Queue of size=40960, why can’t a define a native array of the same size? What’s different about the Queue creation?