MKR1500NB as USB Mass Storage Device with SD Card working as IoT Modem

Dear all,
I am coming here for help as my last resort.

We are currently building some sort of "proof of concept" design for a USB Modem, using an Arduino MKR 1500 NB with SD Card shield. The goal is to provide wireless data transfer to some old devices we have in the field which do not have any connectivity. Up until now the service technicians always needed to manually plug an USB-Stick, then the devices automatically save the log files to the stick. Then the technician must plug the stick into his laptop and upload the data to our server manually.
The idea was now to equip those old devices with a USB Modem, so whenever a new file gets saved (daily, weekly, etc.) it is automatically transferred to the cloud using LTE.

For this I have bought the MKR 1500 NB with SD Card shield and tried to get it to act as USB Mass Storage Device using the Adafruit TinyUSB Library - without much luck. I've tried "porting" the SAMD core to get it to work and also modifying the boards.txt file in the adafruit core with a "custom" NB1500 board, but it doesn't compile...

https://github.com/adafruit/Adafruit_TinyUSB_Arduino

Has anyone had any luck using TinyUSB or any other library to get the NB1500 to act as a USB Mass Storage device?

Thanks for your help!

Well, I tried it again with a custom board definition in the adafruit core, now I'm getting a metric ton of compilation errors

C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6648:3: error: unknown type name 'uint32_t'; did you mean 'wint_t'?
 6648 |   uint32_t blockSize);
      |   ^~~~~~~~
      |   wint_t
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6660:3: error: unknown type name 'uint32_t'; did you mean 'wint_t'?
 6660 |   uint32_t blockSize);
      |   ^~~~~~~~
      |   wint_t
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6733:16: error: unknown type name '__STATIC_INLINE'
 6733 |   CMSIS_INLINE __STATIC_INLINE float32_t arm_bilinear_interp_f32(
      |                ^~~~~~~~~~~~~~~
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6733:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'arm_bilinear_interp_f32'
 6733 |   CMSIS_INLINE __STATIC_INLINE float32_t arm_bilinear_interp_f32(
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6799:16: error: unknown type name '__STATIC_INLINE'
 6799 |   CMSIS_INLINE __STATIC_INLINE q31_t arm_bilinear_interp_q31(
      |                ^~~~~~~~~~~~~~~
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6799:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'arm_bilinear_interp_q31'
 6799 |   CMSIS_INLINE __STATIC_INLINE q31_t arm_bilinear_interp_q31(
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6873:16: error: unknown type name '__STATIC_INLINE'
 6873 |   CMSIS_INLINE __STATIC_INLINE q15_t arm_bilinear_interp_q15(
      |                ^~~~~~~~~~~~~~~
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6873:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'arm_bilinear_interp_q15'
 6873 |   CMSIS_INLINE __STATIC_INLINE q15_t arm_bilinear_interp_q15(
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6951:16: error: unknown type name '__STATIC_INLINE'
 6951 |   CMSIS_INLINE __STATIC_INLINE q7_t arm_bilinear_interp_q7(
      |                ^~~~~~~~~~~~~~~
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\tools\CMSIS\5.4.0/CMSIS/DSP/Include/arm_math.h:6951:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'arm_bilinear_interp_q7'
 6951 |   CMSIS_INLINE __STATIC_INLINE q7_t arm_bilinear_interp_q7(
      |                                     ^~~~~~~~~~~~~~~~~~~~~~
In file included from C:\dontcare\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.16\cores\arduino\math_helper.c:50:
C:\dontcare\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.16\cores\arduino\math_helper.h:49:47: error: unknown type name 'uint32_t'; did you mean 'wint_t'?
   49 | float arm_snr_f32(float *pRef, float *pTest,  uint32_t buffSize);
      |                                               ^~~~~~~~
      |                                               wint_t

exit status 1

Compilation error: exit status 1

Since the Arduino.h file is automatically included and it has all the stdint and stdlib includes, the unknown type name errors are a mystery to me...
Could it be the CMSIS version? Adafruit uses 5.4.0 while the Arduino core uses 4.5.0...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.