Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: lurcio on Jan 22, 2018, 11:57 am

Title: Arduino mega 2560 issues
Post by: lurcio on Jan 22, 2018, 11:57 am
Someone can help me?

When I upload the firmware on my 3d printer,I read this problem:


 ^

sketch\src/motion/stepper.h:298:25: note: in expansion of macro 'MAX_STEP_FREQUENCY'

       NOMORE(step_rate, MAX_STEP_FREQUENCY);

                         ^

sketch\src/conditionals_post.h:471:53: warning: integer overflow in expression [-Woverflow]

   #define MAX_STEP_FREQUENCY (DOUBLE_STEP_FREQUENCY * 4) // Max step frequency for the Due is approx. 330kHz

                                                     ^

sketch\src/macros.h:80:40: note: in definition of macro 'NOMORE'

 #define NOMORE(v,n) do{ if (v > n) v = n; }while(0)

                                        ^

sketch\src/motion/stepper.h:298:25: note: in expansion of macro 'MAX_STEP_FREQUENCY'

       NOMORE(step_rate, MAX_STEP_FREQUENCY);

                         ^


Thanks
Title: Re: Arduino mega 2560 issues
Post by: Budvar10 on Jan 23, 2018, 11:43 am
I would start with this:
 integer overflow in expression [-Woverflow]
v and n in the macro.
How the step_rate is defined? It is probably small for MAX_STEP_FREQUENCY ... DOUBLE_STEP_FREQUENCY.