0.92 JAM_PIN, Azteeg Pro X3 Pin 19 compile failure...
Hi All,
I'm new here, have done a deep search to no avail. I've been using and lightly modifying my printer's Repetier v0.92 firmware for some time. I'm stuck on 0.92 due to the nature of the support and warrantee validity from the printer company, and lack of programming knowledge on my part to upgrade on my own. Hoping greatly someone here can help. I have a Dyze Filament Sentinel connected to the Z-Max pins of the Azteeg X3 Pro (Arduino/Genuino Mega 2560).
Panacutt's documentation calls out the proper analog pin assignment as "19".
For Extruder 1, in Configuration.h I've set:
#define EXT1_JAM_PIN ORIG_Z_MAX_PIN
#define EXT1_JAM_PULLUP 0
#define JAM_ACTION 1
#define JAM_METHOD 3
...in pins.h under the Azteeg X3 Pro section:
#define ORIG_Z_MAX_PIN 19
Problem: Setting EXT1_JAM_PIN to anything by -1 (disabled) caused a compiler error (attached).
Compiler error file, verbose, attached
Screen Shot of the board and where it's been connected attached
Screen Shot of the Panacutt pin assignments attached
Thanks for reading and for the effort!
Dan
I'm new here, have done a deep search to no avail. I've been using and lightly modifying my printer's Repetier v0.92 firmware for some time. I'm stuck on 0.92 due to the nature of the support and warrantee validity from the printer company, and lack of programming knowledge on my part to upgrade on my own. Hoping greatly someone here can help. I have a Dyze Filament Sentinel connected to the Z-Max pins of the Azteeg X3 Pro (Arduino/Genuino Mega 2560).
Panacutt's documentation calls out the proper analog pin assignment as "19".
For Extruder 1, in Configuration.h I've set:
#define EXT1_JAM_PIN ORIG_Z_MAX_PIN
#define EXT1_JAM_PULLUP 0
#define JAM_ACTION 1
#define JAM_METHOD 3
...in pins.h under the Azteeg X3 Pro section:
#define ORIG_Z_MAX_PIN 19
Problem: Setting EXT1_JAM_PIN to anything by -1 (disabled) caused a compiler error (attached).
Compiler error file, verbose, attached
Screen Shot of the board and where it's been connected attached
Screen Shot of the Panacutt pin assignments attached
Thanks for reading and for the effort!
Dan
Comments
long __attribute__((used)) stepperWait = 0;
and I see you compiled HAL.cpp. Interestingly it is defined directly before the setTimer function which is missing this.long __attribute__((used)) stepperWait = 0;
// ================== Interrupt handling ======================
/** \brief Sets the timer 1 compare value to delay ticks.
This function sets the OCR1A compare counter to get the next interrupt
at delay ticks measured from the last interrupt. delay must be << 2^24
*/
inline void setTimer(uint32_t delay) {
__asm__ __volatile__ (
"cli \n\t"
"tst %C[delay] \n\t" //if(delay<65536) {
So as first step I would check if the code is there and not somehow deleted. If it is there try deleting the tmp directory Arduino uses to compile and retry.
https://pastebin.com/embed_iframe/wP3uyAzu
long stepperWait = 0;
try replacing it with
long __attribute__((used)) stepperWait = 0;
It is the same, but since it only gets used in the assembler part the C++ compiler does not see it and optimizes it away causing the problem.
https://forum.repetier.com/discussion/2389/stepperwait-referenced-in-section-text-compiliation-issues
...and the change worked for linking.
After all of that work, no log file debug information for my jam sensor with M302, M602 S0 P0
https://pastebin.com/embed_iframe/hX8Zjwyt
...but that's perhaps my issue with board connection.
M602 S1 P1
to enable and debug jam.
If I get the output working, will post details here for others. Currently, no magic.
For reference, here's how the sensor is hooked up. Looks right to me... With #define ORIG_Z_MAX_PIN 19 set in pins.h, I should be seeing some messages in the printer log (full debug enabled) - but nothing. Perhaps ORIG_Z_MAX_PIN is being redefined somehow?
So, problem solved. It turns out that for the Azteeg X3 Pro, Dyze has the wrong instructions. They say to set JAM_METHOD 3. That would be Signal;Ground;Power. I changed it to JAM_METHOD 2, which is Ground; Signal; Power as the pins are laid out on the board. So, to conclude for others:
…with:
long __attribute__((used)) stepperWait = 0;
Now back to printing; thanks again for all of the help!