Forum Rule: Always post complete source code & details to reproduce any issue!
Page 9 of 9 FirstFirst ... 7 8 9
Results 201 to 207 of 207

Thread: Teensyduino 1.54 Beta #5

  1. #201
    Deleted User
    Guest
    Yes, there need to be certain registers set to allow writing. NDA... But this is not the point.
    During reboot the tinker-protection seems to be triggered and the LPGPRs are zeroed. Anyway, I see no possibility to set the GPR_Z_DIS and keep that up for the next power-up, because it always becomes unset at boot.

    I am stopping my trials here, because of that. The flash has already a lot of burns on it and the next Teensy 4.1's are on the snail.

    It would be super cool to implement a function call to handle all the steps and offer the user an easy way to read and write, without having to deal with SNVS.

  2. #202
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,871
    Asi I mentioned in I believe post #193, if you look at the SNVS_HP register at the NPSWA_EN - mentions

    When set, allows non-privileged software to access all SNVS registers, including those that are privileged
    software read/write access only.
    That would probably be the first one I would try to see what it is set to and if not set can I set it.

    Then again probably all of our code runs as privileged?

    Don't know if other registers involved? like some CCM? Did not find one.

  3. #203
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,229
    @Deleted User, please open a new thread.

    This has nothing to do with a new Teensyduino release.

    And please post some sourcecode there that we can copy&paste. That bit worked for me, a year ago.
    Last edited by Frank B; 01-28-2021 at 05:40 PM.

  4. #204
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,732
    Quote Originally Posted by Deleted User View Post
    oh, sorry for the crippled post... ^.^
    Now the problem is on Teensy 4.x, the battery buffered RTC RAM seems to be not working in several aspects. Teensy 4.1 documentation says

    These LPGPR0 ff are not defined. SO this docuemtation is misleading.

    Using SNVS_LPGPR does not work. Write to this has no effect.
    #define SNVS_LPGPR0 (IMXRT_SNVS.offset100) .. 10C and accessing these does compile, but writing has no effect.
    GPR_Z_DIS in LPCR gets reset every boot, so LPGPR0 .. 3 get zeroed as well, rendering the battery backed memory useless.
    There are 16 bytes of USABLE RTC backed NVRAM on the 1062 in T_4.1 and T_4.0.

    Just started this THREAD :: Teensy-4-x-s-1062-MCU-has-16-bytes-of-NVRAM-on-RTC-unit

    It takes a majik undocumented bit change Frank_B found.

    That post shows code already - going back to add notes.

    This code is from prior code posted on forum months back.

  5. #205
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,871
    @Frank B and Deleted User. So far I have tried simple stuff... Not working:
    Code:
    #define SNVS_LPGPR0      (IMXRT_SNVS.offset100)
    #define SNVS_LPGPR1      (IMXRT_SNVS.offset104)
    #define SNVS_LPGPR2      (IMXRT_SNVS.offset108)
    #define SNVS_LPGPR3      (IMXRT_SNVS.offset10C)
    
    void setup() {
      while (!Serial);
      Serial.begin(115200);
      Serial.println("At startup");
      SNVS_HPCOMR |= 0x80000000l;
      Serial.printf("%x %x %x %x\n", SNVS_LPGPR0, SNVS_LPGPR1, SNVS_LPGPR2,
                    SNVS_LPGPR3);
      delay(100);
      SNVS_LPGPR0 += 1;
      SNVS_LPGPR1 += 2;
      SNVS_LPGPR2 += 3;
      SNVS_LPGPR3 += 4;
      Serial.println("After settting");
      Serial.printf("%x %x %x %x\n", SNVS_LPGPR0, SNVS_LPGPR1, SNVS_LPGPR2,
                    SNVS_LPGPR3);
      SNVS_LPGPR = 100;
      Serial.printf("%x\n", SNVS_LPGPR);              
    }
    void loop() {
      
    }
    And everything prints out as 0s...

    And I agree should go to new thread

    ----> Going to new thread

  6. #206
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,871
    @Paul - I just did a sync of the cores project and my simple test program no longer compiles for T4...
    Code:
    "C:\\arduino-1.8.13\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4\\bootdata.c" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_697394\\core\\bootdata.c.o"
    "C:\\arduino-1.8.13\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4\\digital.c" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_697394\\core\\digital.c.o"
    In file included from C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\analog.c:1:0:
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\analog.c: In function 'analog_init':
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1338:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CCGR1   (IMXRT_CCM.offset06C)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\analog.c:171:2: note: in expansion of macro 'CCM_CCGR1'
      CCM_CCGR1 |= CCM_CCGR1_ADC1(CCM_CCGR_ON);
      ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1338:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CCGR1   (IMXRT_CCM.offset06C)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\analog.c:172:2: note: in expansion of macro 'CCM_CCGR1'
      CCM_CCGR1 |= CCM_CCGR1_ADC2(CCM_CCGR_ON);
      ^
    "C:\\arduino-1.8.13\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4\\interrupt.c" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_697394\\core\\interrupt.c.o"
    In file included from C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:2:0:
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c: In function 'set_arm_clock':
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1321:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCDR   (IMXRT_CCM.offset014)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:32:19: note: in expansion of macro 'CCM_CBCDR'
      uint32_t cbcdr = CCM_CBCDR; // pg 1021
                       ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1322:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCMR   (IMXRT_CCM.offset018)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:33:19: note: in expansion of macro 'CCM_CBCMR'
      uint32_t cbcmr = CCM_CBCMR; // pg 1023
                       ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1343:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CCGR6   (IMXRT_CCM.offset080)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:51:2: note: in expansion of macro 'CCM_CCGR6'
      CCM_CCGR6 |= CCM_CCGR6_DCDC(CCM_CCGR_ON);
      ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1321:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCDR   (IMXRT_CCM.offset014)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:78:4: note: in expansion of macro 'CCM_CBCDR'
        CCM_CBCDR = cbcdr;
        ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1322:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCMR   (IMXRT_CCM.offset018)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:84:4: note: in expansion of macro 'CCM_CBCMR'
        CCM_CBCMR = cbcmr;
        ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1331:23: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CDHIPR   (IMXRT_CCM.offset048)
                           ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:85:11: note: in expansion of macro 'CCM_CDHIPR'
        while (CCM_CDHIPR & CCM_CDHIPR_PERIPH2_CLK_SEL_BUSY) ; // wait
               ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1321:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCDR   (IMXRT_CCM.offset014)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:89:3: note: in expansion of macro 'CCM_CBCDR'
       CCM_CBCDR = cbcdr;
       ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1331:23: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CDHIPR   (IMXRT_CCM.offset048)
                           ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:90:10: note: in expansion of macro 'CCM_CDHIPR'
       while (CCM_CDHIPR & CCM_CDHIPR_PERIPH_CLK_SEL_BUSY) ; // wait
              ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1320:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CACRR   (IMXRT_CCM.offset010)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:135:7: note: in expansion of macro 'CCM_CACRR'
      if ((CCM_CACRR & CCM_CACRR_ARM_PODF_MASK) != (div_arm - 1)) {
           ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1320:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CACRR   (IMXRT_CCM.offset010)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:136:3: note: in expansion of macro 'CCM_CACRR'
       CCM_CACRR = CCM_CACRR_ARM_PODF(div_arm - 1);
       ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1331:23: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CDHIPR   (IMXRT_CCM.offset048)
                           ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:137:10: note: in expansion of macro 'CCM_CDHIPR'
       while (CCM_CDHIPR & CCM_CDHIPR_ARM_PODF_BUSY) ; // wait
              ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1321:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCDR   (IMXRT_CCM.offset014)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:143:3: note: in expansion of macro 'CCM_CBCDR'
       CCM_CBCDR = cbcdr;
       ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1331:23: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CDHIPR   (IMXRT_CCM.offset048)
                           ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:144:10: note: in expansion of macro 'CCM_CDHIPR'
       while (CCM_CDHIPR & CCM_CDHIPR_AHB_PODF_BUSY); // wait
              ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1321:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCDR   (IMXRT_CCM.offset014)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:153:3: note: in expansion of macro 'CCM_CBCDR'
       CCM_CBCDR = cbcdr;
       ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1321:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CBCDR   (IMXRT_CCM.offset014)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:158:2: note: in expansion of macro 'CCM_CBCDR'
      CCM_CBCDR &= ~CCM_CBCDR_PERIPH_CLK_SEL;
      ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1331:23: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CDHIPR   (IMXRT_CCM.offset048)
                           ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\clockspeed.c:159:9: note: in expansion of macro 'CCM_CDHIPR'
      while (CCM_CDHIPR & CCM_CDHIPR_PERIPH_CLK_SEL_BUSY) ; // wait
             ^
    Error compiling for board Teensy 4.0.
    My guess is it has to do with your reorganizing the order of these defines?

    Again nothing special in sketch other than to check the stuff you merged in for the LPGPR registers.
    Code:
    #ifndef SNVS_LPGPR0
    #define SNVS_LPGPR0      (IMXRT_SNVS.offset100)
    #define SNVS_LPGPR1      (IMXRT_SNVS.offset104)
    #define SNVS_LPGPR2      (IMXRT_SNVS.offset108)
    #define SNVS_LPGPR3      (IMXRT_SNVS.offset10C)
    #endif
    void setup() {
      while (!Serial);
      Serial.begin(115200);
      Serial.println("At startup");
    //  SNVS_HPCOMR |= SNVS_LPCR_GPR_Z_DIS; //0x80000000l;
      Serial.printf("%x %x %x %x\n", SNVS_LPGPR0, SNVS_LPGPR1, SNVS_LPGPR2,
                    SNVS_LPGPR3);
      delay(100);
      SNVS_LPCR |= (1 << 24);
      SNVS_LPGPR0 += 1;
      SNVS_LPGPR1 += 2;
      SNVS_LPGPR2 += 3;
      SNVS_LPGPR3 += 4;
      Serial.println("After settting");
      Serial.printf("%x %x %x %x\n", SNVS_LPGPR0, SNVS_LPGPR1, SNVS_LPGPR2,
                    SNVS_LPGPR3);
    //  SNVS_LPGPR = 100;
    //  Serial.printf("%x\n", SNVS_LPGPR);              
    }
    void loop() {
      
    }

  7. #207
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,871
    Quote Originally Posted by KurtE View Post
    @Paul - I just did a sync of the cores project and my simple test program no longer compiles for T4...
    Code:
    "C:\\arduino-1.8.13\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4\\bootdata.c" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_697394\\core\\bootdata.c.o"
    "C:\\arduino-1.8.13\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\arduino-1.8.13\\hardware\\teensy\\avr\\cores\\teensy4\\digital.c" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_697394\\core\\digital.c.o"
    In file included from C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\analog.c:1:0:
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\analog.c: In function 'analog_init':
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
                                                ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1338:22: note: in expansion of macro 'IMXRT_CCM'
     #define CCM_CCGR1   (IMXRT_CCM.offset06C)
                          ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\analog.c:171:2: note: in expansion of macro 'CCM_CCGR1'
      CCM_CCGR1 |= CCM_CCGR1_ADC1(CCM_CCGR_ON);
      ^
    C:\arduino-1.8.13\hardware\teensy\avr\cores\teensy4\imxrt.h:1316:44: error: expected expression before ')' token
     #define IMXRT_CCM  (*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
    ...
    Found - one liner 1316
    Code:
    -#define IMXRT_CCM		(*(IMXRT_REGISTER32_t *))IMXRT_CCM_ADDRESS
    +#define IMXRT_CCM		(*(IMXRT_REGISTER32_t *)IMXRT_CCM_ADDRESS)
    Could PR, although probably quicker for you to move the )...

    Did PR: in case that makes it easier... https://github.com/PaulStoffregen/cores/pull/538
    Last edited by KurtE; 01-29-2021 at 06:33 PM.

Posting Permissions

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