Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Teensy 3.6: how to port "Arducam Mini Module 2mp" to Teensy?

  1. #1
    Member
    Join Date
    Oct 2015
    Location
    Roma (IT, UE)
    Posts
    67

    Teensy 3.6: how to port "Arducam Mini Module 2mp" to Teensy?

    Hello,
    I'd like to drive my Arducam Mini Module 2mp (OV2640) from my Teensy 3.6 (taking timelapse JPEG stills and saving to onboard SD).

    The "official" Arducam library is here:
    https://github.com/ArduCAM/Arduino

    I've tried building the included "functions" sample sketch with Arduino IDE 1.8.7 (Teensyduino 1.44):
    https://github.com/ArduCAM/Arduino/t...2640_functions

    but I get this build error:


    F:\Arduino\libraries\ArduCAM/ArduCAM.h:713:2: error: 'regtype' does not name a type

    regtype *P_CS;

    ^

    F:\Arduino\libraries\ArduCAM/ArduCAM.h:714:2: error: 'regsize' does not name a type

    regsize B_CS;


    Selecting an Arduino board, the sketch builds correctly.

    Full build log:

    Code:
    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Fernando\AppData\Local\Arduino15\packages -hardware F:\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Fernando\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries F:\Arduino\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180,opt=o2std,keys=en-us -ide-version=10807 -build-path d:\temp\arduino_build_601000 -warnings=none -build-cache d:\temp\arduino_cache_523679 -verbose F:\Arduino\libraries\ArduCAM\examples\mini\ArduCAM_Mini_2MP_OV2640_functions\ArduCAM_Mini_2MP_OV2640_functions.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Fernando\AppData\Local\Arduino15\packages -hardware F:\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Fernando\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries F:\Arduino\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180,opt=o2std,keys=en-us -ide-version=10807 -build-path d:\temp\arduino_build_601000 -warnings=none -build-cache d:\temp\arduino_cache_523679 -verbose F:\Arduino\libraries\ArduCAM\examples\mini\ArduCAM_Mini_2MP_OV2640_functions\ArduCAM_Mini_2MP_OV2640_functions.ino
    Using board 'teensy36' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Using core 'teensy3' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
    Detecting libraries used...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "d:\\temp\\arduino_build_601000\\sketch\\ArduCAM_Mini_2MP_OV2640_functions.ino.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "d:\\temp\\arduino_build_601000\\sketch\\ArduCAM_Mini_2MP_OV2640_functions.ino.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "d:\\temp\\arduino_build_601000\\sketch\\ArduCAM_Mini_2MP_OV2640_functions.ino.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "d:\\temp\\arduino_build_601000\\sketch\\ArduCAM_Mini_2MP_OV2640_functions.ino.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire\\utility" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire\\Wire.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire\\utility" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire\\WireKinetis.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire\\utility" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire\\utility\\twi.c" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "F:\\Arduino\\libraries\\ArduCAM\\ArduCAM.cpp" -o nul
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI\\SPI.cpp" -o nul
    Generating function prototypes...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "d:\\temp\\arduino_build_601000\\sketch\\ArduCAM_Mini_2MP_OV2640_functions.ino.cpp" -o "d:\\temp\\arduino_build_601000\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    "C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "d:\\temp\\arduino_build_601000\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/precompile_helper" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy3" "d:\\temp\\arduino_build_601000" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy3" "d:\\temp\\arduino_build_601000/pch/Arduino.h" -o "d:\\temp\\arduino_build_601000/pch/Arduino.h.gch"
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=144 -DARDUINO=10807 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-Id:\\temp\\arduino_build_601000/pch" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy3" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "-IF:\\Arduino\\libraries\\ArduCAM" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "d:\\temp\\arduino_build_601000\\sketch\\ArduCAM_Mini_2MP_OV2640_functions.ino.cpp" -o "d:\\temp\\arduino_build_601000\\sketch\\ArduCAM_Mini_2MP_OV2640_functions.ino.cpp.o"
    In file included from F:\Arduino\libraries\ArduCAM\examples\mini\ArduCAM_Mini_2MP_OV2640_functions\ArduCAM_Mini_2MP_OV2640_functions.ino:11:0:
    
    F:\Arduino\libraries\ArduCAM/ArduCAM.h:713:2: error: 'regtype' does not name a type
    
      regtype *P_CS;
    
      ^
    
    F:\Arduino\libraries\ArduCAM/ArduCAM.h:714:2: error: 'regsize' does not name a type
    
      regsize B_CS;
    
      ^
    
    ArduCAM_Mini_2MP_OV2640_functions: In function 'void loop()':
    ArduCAM_Mini_2MP_OV2640_functions:471: warning: unused variable 'temp_last' 
         uint8_t temp, temp_last;
    
                       ^
    
    Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire 
    Using library ArduCAM in folder: F:\Arduino\libraries\ArduCAM (legacy)
    Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI 
    Error compiling for board Teensy 3.6.
    Looks like "something" is different in Teensy's SPI library?
    Any hints?
    Thanks!

    Fernando

  2. #2
    Member
    Join Date
    Oct 2015
    Location
    Roma (IT, UE)
    Posts
    67
    Nevermind... fixed regtype/regsize, but a lot more bulid errors surfaced.
    Giving up...

  3. #3
    Member
    Join Date
    Oct 2015
    Location
    Roma (IT, UE)
    Posts
    67
    Submitted issue to Arducam support:
    https://github.com/ArduCAM/Arduino/issues/368

    Let's see what happens, will keep you posted.

    Fernando

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •