Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Writing an image SD card
-
The method I described is recommended. If you use my method instead of modifying the Makefile do you get this error?
Best Regards,
Kamil Tomaszewski -
@KamilTomaszewski i tried executing make menuconfig but I get this error "make: *** No rule to make target 'menuconfig'. Stop.". Do you know any means to rectify it?
-
Hi @Bhalaji-Kharthik When you try to run this command, are you under
spresense/sdk
? -
@KamilTomaszewski Now the command is running fine but I am not able to access projects outside spresense/sdk folder
-
@Bhalaji-Kharthik That's good. Do you mean you don't see configuration of your application which is outside the spresense directory in menuconfig?
-
This post is deleted! -
@KamilTomaszewski yes, I am only able to see applications within spresense/sdk folder
-
How did you configure your application before?
Could you please send me a link to the documentation you used to create your project?
Best Regards,
Kamil Tomaszewski -
@KamilTomaszewski I followed the steps to create a project from the below link.
-
@Bhalaji-Kharthik Ah, you are using the IDE. Then you need to change
STACKSIZE
inmyproject/myapps/Makefile
. Are you also trying to use std image library? -
@KamilTomaszewski Yes, i tried changing the stack size already in makefile but it doesn't seem to work. I am using stb image library. Are there any other reasons for getting stack dump errors?
-
@Bhalaji-Kharthik You can get a stack dump after Hard Fault or Assert.
I have just tried the stb library on the IDE and it works for me.
I added this line to the Makefile:
STACKSIZE = 8192
My code looks like this:
#include <nuttx/config.h> #include <stdio.h> #include <stdlib.h> #define STB_IMAGE_IMPLEMENTATION #include "stb_image/stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image/stb_image_write.h" int main(int argc, char *argv[]) { int width, height, channels; unsigned char *img = stbi_load("/mnt/sd0/test.jpg", &width, &height, &channels, 0); if(img == NULL) { printf("Error in loading the image\n"); exit(1); } printf("Loaded image with a width of %dpx, a height of %dpx and %d channels\n", width, height, channels); stbi_write_jpg("/mnt/sd0/test2.jpg", width, height, channels, img, 100); stbi_image_free(img); return 0; }
What is the size of the picture you are trying to read or write?