سؤال

I've had the misfortune of being required to use CrossWorks for developing for an STM32F4 development board, and I'm running into an issue that only crops up when using CrossWorks to build and run the project.

I'm using LwIP to create a UDP server, which has been working just fine when I use TrueSTUDIO. However, when I run it under CrossWorks, there's a hard fault in ethernetif_input(), which is called when a packet is ready to read. The specific point at which it fails is when it calls memcpy() while moving packet information between packet buffers.

I have no idea what changed -- it's the exact same code, built for the same target, and it breaks in CrossWorks. I'm hoping that someone has insight into any part of this issue... it would be great if you had any thoughts pertaining to this.

Thanks, and let me know if you need any details from me!

هل كانت مفيدة؟

المحلول

Turns out that CrossWorks automatically sets the heap and stack size to be too small. The default is 128 bytes, and my program overran that, causing the hard fault. I bumped it up, and we're all good.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top