Sony's Developer World forum

    • Home
    • Forum guidelines

    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

    Spresense
    3
    17
    2812
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bhalaji Kharthik @KamilTomaszewski last edited by

      @KamilTomaszewski I tried changing the stack size value in makefile of my project yet I'm encountering same dump errors. Is the above way you mentioned the only way to change stack size?

      K 1 Reply Last reply Reply Quote
      • K
        KamilTomaszewski DeveloperWorld @Bhalaji Kharthik last edited by

        Hi @Bhalaji-Kharthik

        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

        B 1 Reply Last reply Reply Quote
        • B
          Bhalaji Kharthik @KamilTomaszewski last edited by

          @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?

          K 1 Reply Last reply Reply Quote
          • K
            KamilTomaszewski DeveloperWorld @Bhalaji Kharthik last edited by

            Hi @Bhalaji-Kharthik When you try to run this command, are you under spresense/sdk?

            B 1 Reply Last reply Reply Quote
            • B
              Bhalaji Kharthik @KamilTomaszewski last edited by

              @KamilTomaszewski Now the command is running fine but I am not able to access projects outside spresense/sdk folder

              K 1 Reply Last reply Reply Quote
              • K
                KamilTomaszewski DeveloperWorld @Bhalaji Kharthik last edited by

                @Bhalaji-Kharthik That's good. Do you mean you don't see configuration of your application which is outside the spresense directory in menuconfig?

                B 2 Replies Last reply Reply Quote
                • B
                  Bhalaji Kharthik @KamilTomaszewski last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote
                  • B
                    Bhalaji Kharthik @KamilTomaszewski last edited by

                    @KamilTomaszewski yes, I am only able to see applications within spresense/sdk folder

                    K 1 Reply Last reply Reply Quote
                    • K
                      KamilTomaszewski DeveloperWorld @Bhalaji Kharthik last edited by

                      Hi @Bhalaji-Kharthik

                      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

                      B 1 Reply Last reply Reply Quote
                      • B
                        Bhalaji Kharthik @KamilTomaszewski last edited by Bhalaji Kharthik

                        @KamilTomaszewski I followed the steps to create a project from the below link.

                        https://developer.sony.com/develop/spresense/docs/sdk_set_up_ide_en.html#_creating_an_application_project

                        1 Reply Last reply Reply Quote
                        • K
                          KamilTomaszewski DeveloperWorld last edited by

                          @Bhalaji-Kharthik Ah, you are using the IDE. Then you need to change STACKSIZE in myproject/myapps/Makefile. Are you also trying to use std image library?

                          B 1 Reply Last reply Reply Quote
                          • B
                            Bhalaji Kharthik @KamilTomaszewski last edited by

                            @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?

                            K 1 Reply Last reply Reply Quote
                            • K
                              KamilTomaszewski DeveloperWorld @Bhalaji Kharthik last edited by

                              @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?

                              1 Reply Last reply Reply Quote
                              • First post
                                Last post
                              Developer World
                              Copyright © 2021 Sony Group Corporation. All rights reserved.
                              • Contact us
                              • Legal