Initial OnstepX download error


Robert Benward
 
Edited

Hi Howard,
I am trying out OnstepX.  I put in the basic configuration, basically repeating what I have running on 4.24C. I got the following errors below, near the end of compilation.  The only thing I can see is the I2C init is different for the ESP32 than the other processors.   Can you steer me in the right direction?  Maybe I have an older build?

// Firmware version ----------------------------------------------------------------------------------------------------------------
#define FirmwareName                "On-Step"
#define FirmwareVersionMajor        10
#define FirmwareVersionMinor        07     // minor version 00 to 99
#define FirmwareVersionPatch        "l"    // for example major.minor patch: 10.03c
#define FirmwareVersionConfig       5      // internal, for tracking configuration file changes

I am attaching my config and ext.config files.

Also, is the driver TMC5160_QUIET no longer valid?

Thanks,
Bob

In file included from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL.h:89:0,
                 from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\Common.h:12,
                 from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:50:
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino: In function 'void setup()':
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:7: error: 'HAL_SDA_PIN' was not declared in this scope
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
       ^
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:29: error: 'HAL_SCL_PIN' was not declared in this scope
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
                             ^
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^
 


Chad Gray
 

When i first switched i dont remember the error i got, but do check that you are using 2.0.0 on the ESP32


image.png


On Tue, Jun 21, 2022 at 3:51 PM Robert Benward via groups.io <rbenward=verizon.net@groups.io> wrote:
Howard,
I am trying out OnstepX.  I put in the basic configuration, basically repeating what I have running on 4.24C. I got the following errors below, near the end of compilation.  The only thing I can see is the I2C init is different for the ESP32 than the other processors.   Can you steer me in the right direction?  Maybe I have an older build?

// Firmware version ----------------------------------------------------------------------------------------------------------------
#define FirmwareName                "On-Step"
#define FirmwareVersionMajor        10
#define FirmwareVersionMinor        07     // minor version 00 to 99
#define FirmwareVersionPatch        "l"    // for example major.minor patch: 10.03c
#define FirmwareVersionConfig       5      // internal, for tracking configuration file changes

I am attaching my config and ext.config files.

Also, is the driver TMC5160_QUIET no longer valid?

Thanks,
Bob

In file included from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL.h:89:0,
                 from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\Common.h:12,
                 from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:50:
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino: In function 'void setup()':
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:7: error: 'HAL_SDA_PIN' was not declared in this scope
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
       ^
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:29: error: 'HAL_SCL_PIN' was not declared in this scope
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
                             ^
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^
 


Howard Dutton
 

On Tue, Jun 21, 2022 at 12:51 PM, Robert Benward wrote:
Also, is the driver TMC5160_QUIET no longer valid?
No, use "TMC5160".

You don't seem to be using a supplied pinmap.

If making your own I suggest leaving PINMAP OFF and adding the lines in Config.h or a file #included in Config.h


Robert Benward
 
Edited

Chad,  Thanks for the preferences, that allowed me to find the 2.0.0.  I had 1.0.6 loaded, but not sure it made any difference.

Howard,  I created this pinmap based on some discussions months ago.  I started with a copy of the MaxESP and modified from there.  This error does not seem to be associated with that (I think...).  I did find one error on my part, the pinmap was not included in the models/h.  I had it here originally, but some folder cleanups and I must have made the changes in the wrong folder and lost the edits.  Thus, I did another verify/compile and I got some errors slightly different.  See below in red. 

When I commented out the dissimilar code  (if (HAL_SDA_PIN != OFF) between the ESP32 processor and others (HAL_ESP32.h) , that error went away, and then then I got the errors in blue.  I will follow that thread and see where that takes me.

Bob

In file included from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL.h:89,
                 from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\Common.h:12,
                 from W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:50:
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino: In function 'void setup()':
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:7: error: 'HAL_SDA_PIN' was not declared in this scope
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
       ^~~~~~~~~~~
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^~~~~~~~
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:7: note: suggested alternative: 'NOT_A_PIN'
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
       ^~~~~~~~~~~
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^~~~~~~~
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:29: error: 'HAL_SCL_PIN' was not declared in this scope
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
                             ^~~~~~~~~~~
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^~~~~~~~
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\src\HAL\HAL_ESP32.h:58:29: note: suggested alternative: 'HALF_PI'
   if (HAL_SDA_PIN != OFF && HAL_SCL_PIN != OFF) HAL_Wire.begin(HAL_SDA_PIN, HAL_SCL_PIN, HAL_WIRE_CLOCK); \
                             ^~~~~~~~~~~
W:\Document\Astronomy\OnStep Drive System\Software\OnStepX\OnStepX.ino:81:3: note: in expansion of macro 'HAL_INIT'
   HAL_INIT();
   ^~~~~~~~


V:\OnStepX\src\telescope\mount\st4\St4.cpp: In member function 'void St4::poll()':
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: error: 'serialST4' was not declared in this scope
             serialST4.begin();
             ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: note: suggested alternative: 'Serial2'
             serialST4.begin();
             ^~~~~~~~~
             Serial2
V:\OnStepX\src\telescope\mount\st4\St4.cpp:86:20: error: 'serialST4' was not declared in this scope
           char c = serialST4.poll();
                    ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:86:20: note: suggested alternative: 'Serial2'
           char c = serialST4.poll();
                    ^~~~~~~~~
                    Serial2
V:\OnStepX\src\telescope\mount\st4\St4.cpp:102:11: error: 'serialST4' was not declared in this scope
           serialST4.end();
           ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:102:11: note: suggested alternative: 'Serial2'
           serialST4.end();
           ^~~~~~~~~
           Serial2
 


Robert Benward
 

Progress.

I had both ST4_Interface on AND ST4_Hand_Control "on" at the same time.  I turned on ST4_Interface OFF and it uploads.  Still not functioning properly, I could not get the SHC communications running and the SWS would get on my network.

Checking the config.h file....
Bob


Howard Dutton
 

Things have changed in OnStepX and that pinmap file isn't going to work.

I see only two changes from the MaxESP3 pinmap AUX3 and AUX4 are on different pins.

I guess you are looking to change the home sense pins for Axis1 and Axis2.

If so it's better to just use the MaxESP3 pinmap and add the following lines to Config.h:
#define AXIS1_SENSE_HOME_PIN 8
#define AXIS2_SENSE_HOME_PIN 7


Drew 🔭📷🚴‍♂️
 

On Tue, Jun 21, 2022 at 04:19 PM, Howard Dutton wrote:
No, use "TMC5160".
Howard, that needs some elaboration. In Config.h we have the following parameters:

#define AXIS2_DRIVER_DECAY_GOTO OFF // OFF, Decay mode goto default override. TMC default is SPREADCYCLE. Infreq
#define AXIS2_DRIVER_DECAY OFF // OFF, Tracking decay mode default override. TMC default is STEALTHCHOP. Infreq


If I am not mistaken, these parameters replace the old "quiet" and vquiet". Could you elaborate on the use of these?


Howard Dutton
 

On Wed, Jun 22, 2022 at 06:05 AM, Drew 🔭📷🚴‍♂️ wrote:
Howard, that needs some elaboration. In Config.h we have the following parameters:

#define AXIS2_DRIVER_DECAY_GOTO OFF // OFF, Decay mode goto default override. TMC default is SPREADCYCLE. Infreq
#define AXIS2_DRIVER_DECAY OFF // OFF, Tracking decay mode default override. TMC default is STEALTHCHOP. Infreq


If I am not mistaken, these parameters replace the old "quiet" and vquiet". Could you elaborate on the use of these?

The following OnStepX Wiki page covers this (scroll down most of the way):

Axes, enables and configures the Mount, Rotator, and Focusers associated drives.


Robert Benward
 

Howard,
Things have changed in OnStepX and that pinmap file isn't going to work.

I see only two changes from the MaxESP3 pinmap AUX3 and AUX4 are on different pins.

I guess you are looking to change the home sense pins for Axis1 and Axis2.

If so it's better to just use the MaxESP3 pinmap and add the following lines to Config.h:
#define AXIS1_SENSE_HOME_PIN 8
#define AXIS2_SENSE_HOME_PIN 7
Now I see part of my errors.  My pinmap was based on the 4.24C MaxESP3 pinmap.  The OnstepX pinmap is different.  They had the same file name, I assumed incorrectly they were the same.   It explains why when I enabled serial port B, I got this error:

In file included from V:\OnStepX\src\pinmaps\Models.h:83,
                 from V:\OnStepX\src\Common.h:14,
                 from V:\OnStepX\OnStepX.ino:50:
V:\OnStepX\src\pinmaps\Validate.h:12:4: error: #error "Configuration (Config.h): SERIAL_B isn't defined, SERIAL_B_BAUD_DEFAULT should be OFF."
   #error "Configuration (Config.h): SERIAL_B isn't defined, SERIAL_B_BAUD_DEFAULT should be OFF."
    ^~~~~
I have added a MCP23017 port expander.  In the pinmap, how do I tell SW that the port pin is on another device?  My home pins are on 7&8, but I don't see the directions/instructions to go to the port expander.

Also, when I enabled the ST4 port, I believe these should both be ON.  They are in 4.24C.  If I turn ST4_Interface on, I get the error below:

#define ST4_INTERFACE                 OFF //    OFF, ON enables interface. <= 1X guides unless hand control mode.             Option
                                          //         During goto btn press: aborts slew or continue meridian flip pause home
#define ST4_HAND_CONTROL               ON //     ON, ON for hand controller special features and SHC support.                 Option
                                          //         Hold [E]+[W] btns >2s: Guide rate   [E]-  [W]+  [N] trk on/off [S] sync
                                          //         Hold [N]+[S] btns >2s: Usr cat item [E]-  [W]+  [N] goto [S] snd on/off

V:\OnStepX\src\telescope\mount\st4\St4.cpp: In member function 'void St4::poll()':
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: error: 'SerialST4' was not declared in this scope
             SerialST4.begin();
             ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: note: suggested alternative: 'Serial2'
             SerialST4.begin();
             ^~~~~~~~~
             Serial2
V:\OnStepX\src\telescope\mount\st4\St4.cpp:86:20: error: 'SerialST4' was not declared in this scope
           char c = SerialST4.poll();
                    ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:86:20: note: suggested alternative: 'Serial2'
           char c = SerialST4.poll();
                    ^~~~~~~~~
                    Serial2
V:\OnStepX\src\telescope\mount\st4\St4.cpp:102:11: error: 'SerialST4' was not declared in this scope
           SerialST4.end();
           ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:102:11: note: suggested alternative: 'Serial2'
           SerialST4.end();
           ^~~~~~~~~
           Serial2

Bob


Howard Dutton
 

On Wed, Jun 22, 2022 at 03:02 PM, Robert Benward wrote:
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: error: 'SerialST4' was not declared in this scope
             SerialST4.begin();
This makes me wonder if you have the latest OnStepX source code as that line doesn't match what I have.


Howard Dutton
 

On Wed, Jun 22, 2022 at 03:02 PM, Robert Benward wrote:
I have added a MCP23017 port expander.  In the pinmap, how do I tell SW that the port pin is on another device?  My home pins are on 7&8, but I don't see the directions/instructions to go to the port expander.
If you don't need to modify or customize a pinmap DON'T as going down that road leads to hassles for you later.

So, if you want to move the Axis1 and Axis2 home pins to the MCP23017 pins 0 and 1 use the standard MaxESP3 pinmap and add the following to Config.h I would place them near the similar named settings they are associated with:

#define AXIS1_SENSE_HOME_PIN GPIO_PIN(0)
#define AXIS2_SENSE_HOME_PIN GPIO_PIN(1)

And in Extended.config.h activate the MCP23017:

#define GPIO_DEVICE MCP23017


Robert Benward
 

Howard,
I am now using the MaxESP3  pinmap and added the two "#define" lines as instructed in your last post.  I now get the aux tab with the one output I specified so far.

#define FEATURE1_PURPOSE           SWITCH //    OFF, SWITCH, ANALOG_OUT, DEW_HEATER, INTERVALOMETER.                          Option
#define FEATURE1_NAME         "LOWSIDE 1" // "FE..", Name of feature being controlled.                                        Adjust
#define FEATURE1_TEMP                 OFF //    OFF, THERMISTOR or n. Where n is the ds18b20 s/n. For DEW_HEATER temperature. Adjust
#define FEATURE1_PIN           GPIO_PIN(4) //    OFF, AUX for auxiliary pin, n. Where n is the pin#.                           Adjust

I still get an error when I turn on the ST4 interface, so right now I don't have hand controller capability.  I get the error I identified in my previous post and below.  But now I also get this Axis1&2 Driver com failure indicated on the status page.  Both drivers worked with 4.24C.  Pin maps? SPI?


V:\OnStepX\src\telescope\mount\st4\St4.cpp: In member function 'void St4::poll()':
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: error: 'SerialST4' was not declared in this scope
             SerialST4.begin();
             ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: note: suggested alternative: 'Serial2'
             SerialST4.begin();
             ^~~~~~~~~
             Serial2
V:\OnStepX\src\telescope\mount\st4\St4.cpp:86:20: error: 'SerialST4' was not declared in this scope
           char c = SerialST4.poll();
                    ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:86:20: note: suggested alternative: 'Serial2'
           char c = SerialST4.poll();
                    ^~~~~~~~~
                    Serial2
V:\OnStepX\src\telescope\mount\st4\St4.cpp:102:11: error: 'SerialST4' was not declared in this scope
           SerialST4.end();
           ^~~~~~~~~
V:\OnStepX\src\telescope\mount\st4\St4.cpp:102:11: note: suggested alternative: 'Serial2'
           SerialST4.end();
           ^~~~~~~~~
           Serial2


Robert Benward
 

On Wed, Jun 22, 2022 at 07:25 PM, Howard Dutton wrote:
This makes me wonder if you have the latest OnStepX source code as that line doesn't match what I have.
// Firmware version ----------------------------------------------------------------------------------------------------------------
#define FirmwareName                "On-Step"
#define FirmwareVersionMajor        10
#define FirmwareVersionMinor        07     // minor version 00 to 99
#define FirmwareVersionPatch        "l"    // for example major.minor patch: 10.03c
#define FirmwareVersionConfig       5      // internal, for tracking configuration file changes


Bob


Howard Dutton
 

On Wed, Jun 22, 2022 at 06:54 PM, Robert Benward wrote:
V:\OnStepX\src\telescope\mount\st4\St4.cpp:80:13: error: 'SerialST4' was not declared in this scope
             SerialST4.begin();
             ^~~~~~~~~
 Notice the capitalization and look at line 80 here as it doesn't match, so not the same source code:

https://github.com/hjd1964/OnStepX/blob/main/src/telescope/mount/st4/St4.cpp


Howard Dutton
 
Edited

Keep your configuration files (everything except OnStepX.ino from the OnStepX directory) but delete all other OnStepX files.

Download and unzip again (into an /OnStepX directory) and copy the configuration files back into the /OnStepX directory.


Robert Benward
 

Hi Howard,
That was an improvement,  I now get no errors when upload/compiling. All my Aux highside/lowside drivers show up in the "aux" tab.   Making progress! 

But, I still have the axis1&2 communications error, as show in the previous post..  Drivers are not working.   I am using the QHV5160, but I don't believe there is any difference from the TMC5160 communications wise, I believe it's a VM voltage rating thing.  It works fine with the 4.24C SW load.  I am looking in the config file but I can't find anything that might be causing the failure.

Also, The hand controller pops up in the 10x mode, but that is probably my fault, I customized the guide "speeds" in the SHC SW.

A couple of questions:
  • When I add a second MCP23017, does the addressing continue to GPIO (16...31)? How do I guarantee the correct order between the two devices?
  • When there is a conflict in "#define" between the config.h and the pinmap file, which takes precedence?

Regards,
Bob


Howard Dutton
 
Edited

On Thu, Jun 23, 2022 at 11:05 AM, Robert Benward wrote:
  • When I add a second MCP23017, does the addressing continue to GPIO (16...31)? How do I guarantee the correct order between the two devices?
You don't, one GPIO device is supported.

  • When there is a conflict in "#define" between the config.h and the pinmap file, which takes precedence?
Depends... but common settings are #ifndef bracketed so that Config.h takes precedence, for others it could go the other way


Robert Benward
 

Any clue you can give me on the drive comms faults?


Howard Dutton
 

On Thu, Jun 23, 2022 at 11:40 AM, Robert Benward wrote:
Any clue you can give me on the drive comms faults?
I assume you have the jumper that enables MISO comms positioned properly and that nothing else is enabled that would try to use that same pin (AUX2 aka GPIO4.)

Otherwise you could really disable driver status and see if it works.

I made some changes recently so will test with 5160's tonight to see that its still working.


Robert Benward
 

Howard,
Disabling status worked.  I do not have jumpers on my board, MISO has dedicated pins, but I will go over the pinmap to see if here any conflicts.  If this helps, the same board has status and drives working on 4.24C.

Bob