Ankündigung

Einklappen
Keine Ankündigung bisher.

Alternative Firmware für das Raum-Sensormodul von Masifi

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Hi Robert,

    ich habe das Problem noch nie gehabt, deswegen kann ich dazu auch schwer was sagen. Liegt das Projekt im Dateisystem auf dem Rechner? Also kein samba-share, kein NAS, kein OneDrive oder ähnliches? Bist Du sicher, dass wirklich alle Projekte (knx-sensor, knx-logic, knx-common, knx) auf Deiner Platte im gleichen Verzeichnis sind?

    Meine platformio-Installation hab ich genau da gelassen, wo sie standardmäßig hinkommt:   C:/Users/<user>/Documents/PlatformIO/Projects , vielleicht kommt der include-Sucher ja nicht mit anderen Pfaden klar.

    Da ja die Includes nicht gefunden werden, könntest Du noch versuchen, den Pfad mit anzugeben, z.B. in
    Code:
    knx-sensor/src/main.cpp:
    ...
    #include "Hardware.h"
    ersetzen durch
    Code:
    #include "../../knx-common/src/Hardware.h"
    Wenn dann die Meldungen mit "PROG_BUTTON_..." bzw. "PROG_LED_..." verschwinden (andere werden erstmal kommen), dann könnte man in meinen Projekten überall diese #include-Adressierung verwenden. Ich würde das dann durchaus noch ändern, auch wenn ich nicht weiß, warum das passiert. Wenn Du das also soweit ausprobieren könntest, können wir dann weiter schauen.

    Mehr Ideen hab ich nicht...

    Gruß, Waldemar
    OpenKNX www.openknx.de

    Kommentar


      Nur zur Info,
      ich habe nun auf zwei komplette unabhängigen Win10 Rechnern mit frisch installiertem VisualStudioCode versucht genau nach Anleitungen ( https://github.com/mumpf/knx-sensor/...x-dev-setup.md ) vorzugehen. Bekomme leider im wesentlichen die selben Fehler wie jeff25 .

      Gruß,
      Walter
      Zuletzt geändert von Techi; 18.01.2021, 10:04.

      Kommentar


        Hi,

        ich habe damals das setup-Dokument erstellt, indem ich auf einer frischen Win10 VM das Ganze installiert habe und die Schritte beschrieben habe. Natürlich kann sich inzwischen was an Win10, VSCode, PlatformIO etc. was geändert haben. Ich werde es nochmal auf einer frischen VM versuchen, vielleicht kann ich den Fehler so selber reproduzieren. Das dauert aber ein Weilchen, bis ich das alles aufgesetzt habe.

        Techi Hast Du das auch mal mit der alternativen #include-Notation aus meiner letzten Antwort versucht?

        Gruß, Waldemar
        OpenKNX www.openknx.de

        Kommentar


          Hi, I tried it again following all steps as described. Here's my error log: https://pastebin.com/8HU0M9AQ
          I also tried the change of Hardware.h to the real path "C:\Users\fluppie\Documents\PlatformIO\Project s\kn x-common\src" didn't help/solve.

          Maybe you can tell us which version of Atmel SAM is installed in PlatformIO? In my case this is 5.1.1 (PIO Home=>Platforms=>Installed).

          In other projects you see the platformio file installs specific version of these boards/platform files to make sure it compiles with almost everyone. Example from the Tasmota project.
          Code:
          [core]
          ; *** Esp8266 Tasmota modified Arduino core based on core 2.7.4. Added Backport for PWM selection
          platform = espressif8266 @ 2.6.2
          platform_packages = tasmota/framework-arduinoespressif8266 @ ~2.7.4
          platformio/toolchain-xtensa @ 2.40802.200502
          platformio/tool-esptool @ 1.413.0
          platformio/tool-esptoolpy @ ~1.30000.0
          Also if you post your log of a succesful build, we can see the individual versions of each component to see why we can't build it .
          Zuletzt geändert von fluppie; 18.01.2021, 12:34.

          Kommentar


            Also erstes Ergebniss: ( das mit dem Pfad hatte ich auch probiert, leider ohne Besserung )

            In der Platformio.ini gibt es den die define vorgabe für das DBoard,
            als Default steht da "DBOARD_MASIFI_V31".

            in der Hardware.h wird dieser Wert aber gar nicht abgefragt, dort gibt es "nur"

            BOARD_MASIFI_V1
            BOARD_MASIFI_V2
            BOARD_MASIFI_V3


            Bei der Default Vorgabe (also BOARD_MASIFI_V31) werden somit halt einige defines in Hardware.h nicht gemacht.

            Ich hab die Vorgabe in der Platformio.ini nun mal in BOARD_MASIFI_V3 geändert, jetzt kommt man schon weiter, trotzdem gibt es noch zwei Fehler


            C:\Users\user\Documents\PlatformIO\Projects\knx\sr c/knx_facade.h: In member function 'void KnxFacade<P, B>::start()':
            C:\Users\user\Documents\PlatformIO\Projects\knx\sr c/knx_facade.h:213:68: error: no matching function for call to 'attachInterrupt(uint32_t&, void (&)(), uint32_t&)'
            attachInterrupt(_buttonPin, buttonUp, _buttonPinInterruptOn);
            ^

            und

            In file included from C:\Users\user\Documents\PlatformIO\Projects\knx\sr c/knx.h:86:0,
            from src\main.cpp:1:
            C:\Users\user\Documents\PlatformIO\Projects\knx\sr c/knx_facade.h: In member function 'void KnxFacade<P, B>::start()':
            C:\Users\user\Documents\PlatformIO\Projects\knx\sr c/knx_facade.h:213:68: error: no matching function for call to 'attachInterrupt(uint32_t&, void (&)(), uint32_t&)'
            attachInterrupt(_buttonPin, buttonUp, _buttonPinInterruptOn);
            ^

            Zuletzt geändert von Techi; 18.01.2021, 12:37.

            Kommentar


              Bezüglich der verbleibenden Fehler hier noch weiter Infos:

              Die Funktion "attachInterrupt()" gibt es anscheinend nur in der "linux_platform.h" (bei mir ausgewähl weil ich halt für den SAMD21 kompilieren möchte) ist aber ein SAMD21 und somit die "samd_platform.h" welche eben keine "attachInterrupt()" Funktion enthält.


              Wenn ich in der "knx_facade.h" in der Funktion "start()" das "attachInterrupt(_buttonPin, buttonUp, _buttonPinInterruptOn);" auskommentiere, dann kann ich erfolgreich kompilieren.

              Eventuell fehlt da ein #ifdef für den Fall, daß es keine Linux Platform ist ???
              Zuletzt geändert von Techi; 18.01.2021, 12:52.

              Kommentar


                Same here, if I uncomment line 213 "//attachInterrupt(_buttonPin, buttonUp, _buttonPinInterruptOn);"
                It does compile succesfully

                Kommentar


                  Hi Waldemar,

                  ich habe die #include "../../knx-common/src/Hardware.h" mal angepasst, hat wie oben auch schon gemeldet nichts gebracht, habe mich dann erst mal an die KNX Demo gemacht um Grundlegend zu sehen das meien Hardware funktioniert. Würde es nochmal versuchen wenn es hier ein neues update gibt.

                  Gruß
                  RObert

                  Kommentar


                    Hi fluppie and Techi,

                    thank you for the analysis! You solved it. Sorry for the missing definition BOARD_MASIFI_V31 in Hardware.h (I obviously mixed up some branches druing merge). The correct definition is:
                    Code:
                    #ifdef BOARD_MASIFI_V31
                    #define PROG_LED_PIN 13
                    #define PROG_LED_PIN_ACTIVE_ON HIGH
                    #define PROG_BUTTON_PIN 12
                    #define PROG_BUTTON_PIN_INTERRUPT_ON FALLING
                    #define SAVE_INTERRUPT_PIN A2 // 8
                    #define LED_YELLOW_PIN 38
                    // Buzzer
                    #define BUZZER_PIN 9
                    #define I2C_1WIRE_DEVICE_ADDRESSS 0x18  // Address of DS2484 1-Wire-Busmaster chip
                    #define I2C_EEPROM_DEVICE_ADDRESSS 0x50 // Address of 24LC256 eeprom chip
                    #define I2C_RGBLED_DEVICE_ADDRESS 0x60  // Address of PCA9632 RBGW-LED-Driver
                    #endif
                    If you have an 3.1 board from Masifi you need to add this part to Hardware.h, especially PROG_BUTTON_PIN has changed from 11 to 12.

                    For the interrupt issue I will have a look, why this isn't happening in my environment and add an #ifdef, but this part is in the original stack and as far as I remember, I haven't changed there anything.

                    As soon as I know what's going on I will push an update on github.

                    Thank you for your help,
                    Waldemar
                    OpenKNX www.openknx.de

                    Kommentar


                      Hi,

                      I digged a little bit deeper. You cannot comment attachInterrupt, this is needed for the PROG_BUTTON to be informed, if this button is pressed.
                      In my environment there is a

                      Code:
                      .platformio\packages\framework-arduino-samd\cores\arduino\Winterrupts.c
                      which implements this function for SAMD.

                      OK, I need to update my environment. I am still using platform "Atmel SAM" version 4.3.0, the current is 5.1.1... This will take some time until I tested everything. Probably one of you guys find the according include in the current "Atmes SAM" version and can continue in the meantime.

                      Regards,
                      Waldemar
                      OpenKNX www.openknx.de

                      Kommentar


                        btw. on 26.dec user h1as already had the same problem.
                        https://knx-user-forum.de/forum/%C3%...28#post1587828

                        Kommentar


                          Servus,

                          there was an update of the Arduino SAMD Package, which is incompatible to the current usage of the attachInterrupt function in knxfacade.h. You have to update thelsings KNX stack. Someone did a pullrequest to fix that issue some days ago.

                          https://github.com/thelsing/knx/pull/118

                          h1as
                          Zuletzt geändert von h1as; 18.01.2021, 19:17.

                          Kommentar


                            Hi,

                            you are right, here is the relevant change, this is how the start() function has to be in knx_facade.h:
                            Code:
                                void start()
                                {
                                    pinMode(_ledPin, OUTPUT);
                                    digitalWrite(_ledPin, HIGH - _ledPinActiveOn);
                                    pinMode(_buttonPin, INPUT_PULLUP);
                            // Workaround for https://github.com/arduino/ArduinoCore-samd/issues/587
                            #if (ARDUINO_API_VERSION >= 10200)
                                    attachInterrupt(_buttonPin, buttonUp, (PinStatus)_buttonPinInterruptOn);
                            #else
                                    attachInterrupt(_buttonPin, buttonUp, _buttonPinInterruptOn);
                            #endif
                                    enabled(true);
                                }
                            Be careful: My firmware doesn't work with the original stack from thesing. I will try to push a fix tonight! In the meantime you can correct the start() function manually.

                            Regards,
                            Waldemar


                            OpenKNX www.openknx.de

                            Kommentar


                              Also, I think it's good to remove/uncomment the standard arduino library folder from platformio.ini, as in my case there are many libraries installed and this could conflict with this KNX sensor firmware? Not sure about my assumption.
                              Code:
                              lib_extra_dirs = 
                                ${sysenv.USERPROFILE}/Documents/PlatformIO/Projects
                                ;${sysenv.USERPROFILE}/Documents/Arduino/libraries
                              Is there a specific reason why these libraries are commented out?
                              Code:
                              lib_deps =
                              SPI
                              Wire
                              ; Adafruit BME280 Library
                              ; Adafruit Unified Sensor
                              ; ClosedCube HDC1080
                              ; Sparkfun_SCD30_Arduino_Library

                              Kommentar


                                Hi,

                                I updated knx-common and knx few minutes ago, now it should work with current samd api in platformio. Also Board version 3.1 is now integrated.
                                Thanks for your help.

                                Regards,
                                Waldemar
                                OpenKNX www.openknx.de

                                Kommentar

                                Lädt...
                                X