2018-05-31 06:31 PM
Hello,
several days ago I'm trying to encode a BMP image to jpeg, when I do debbug I see that in the jcdctmgr.c file, in the GLOBAL (void) function jinit_forward_dct (j_compress_ptr cinfo) function, an error occurs at this point fdct = (my_fdct_ptr) (* cinfo-> mem-> alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF (my_fdct_controller)); and it sends me to void HardFault_Handler (void) in the file stm32f4xxit.c, I think it's strange because LibJPEG is a set of independent libraries, does anyone have any idea how to solve this problem?
I am working with the STM32F446VE, STM32CubeMX version 4.21 and IAR, with a simple board made by my own, it has a SD card, and the fat files works fine.
THANKS.
ANDR�S FELIPE
#stm32f4 #libjpeg2018-05-31 06:44 PM
Have a Hard Fault Handler that outputs diagnostic information.
Check if the failure is due to the function pointer you provide being bad, or if you have a sufficiently large heap to service the allocation request.
Instrument your allocation routines to see the usage, size of allocation, and success or failure.
2018-06-01 08:20 AM
Hi Clive One,
The heap you mean must be incremented from both the IDE and the CubeMX, cause I already did it from the CubeMX only, not from IAR.
Thanks for your answer.
ANDRÉS FELIPE