You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/19 17:17:19 UTC

[GitHub] [incubator-nuttx-apps] a-lunev commented on issue #246: Illegal calls to romdisk_register()

a-lunev commented on issue #246:
URL: https://github.com/apache/incubator-nuttx-apps/issues/246#issuecomment-844306537


   Hello,
   
   commit ab41d23d7c1d89ae59aa550aa0755adb5c9e7bea broke eagle100:nxflat config:
   ```
   CC:  nxflat_main.c
   .../buildroot-gcc-7.4.0/build_arm_nofpu/staging_dir/bin/arm-nuttx-eabi-gcc -c -fno-builtin -Wall -Wstrict-prototypes -Wshadow -Wundef -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -isystem ".../nuttx/include" -D__NuttX__  -pipe -I ".../apps/include" -Dmain=nxflat_main  nxflat_main.c -o  nxflat_main... ...apps.examples.nxflat.o
   nxflat_main.c: In function 'nxflat_main':
   nxflat_main.c:157:29: error: storage size of 'desc' isn't known
      struct boardioc_romdisk_s desc;
                                ^~~~
   nxflat_main.c:168:9: warning: implicit declaration of function 'boardctl'; did you mean 'prctl'? [-Wimplicit-function-declaration]
      ret = boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc);
            ^~~~~~~~
            prctl
   nxflat_main.c:168:18: error: 'BOARDIOC_ROMDISK' undeclared (first use in this function); did you mean '_BOARDIOCVALID'?
      ret = boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc);
                     ^~~~~~~~~~~~~~~~
                     _BOARDIOCVALID
   nxflat_main.c:168:18: note: each undeclared identifier is reported only once for each function it appears in
   nxflat_main.c:157:29: warning: unused variable 'desc' [-Wunused-variable]
      struct boardioc_romdisk_s desc;
                                ^~~~
   ```
   
   The last commit w/o the build error was b7e9c434891611f0f0d0b2ea683bf4043e629107.
   
   Steps to reproduce:
   ```
   $ mkdir TEST_ROOT
   $ git clone https://github.com/apache/incubator-nuttx.git TEST_ROOT/nuttx
   $ git clone https://github.com/apache/incubator-nuttx-apps TEST_ROOT/apps
   $ cd TEST_ROOT/nuttx
   $ ./tools/configure.sh -l eagle100:nxflat
   ```
   
   Build NXFLAT Toolchain:
   ```
   $ git clone https://bitbucket.org/nuttx/buildroot.git TEST_ROOT/buildroot
   $ cd TEST_ROOT/buildroot
   $ cp configs/cortexm3-eabi-defconfig-7.4.0 .config
   $ make oldconfig
   $ make
   ```
   
   Build NuttX:
   ```
   $ cd TEST_ROOT/nuttx
   $ make CROSSDEV=TEST_ROOT/buildroot/build_arm_nofpu/staging_dir/bin/arm-nuttx-eabi- \
          MKNXFLAT=TEST_ROOT/buildroot/build_arm_nofpu/staging_dir/bin/mknxflat \
          LDNXFLAT=TEST_ROOT/buildroot/build_arm_nofpu/staging_dir/bin/ldnxflat
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org