After some struggles, I can finally debug the firmware in Eclipse with ATMEL-ICE. Below some hints for other developers who want to debug the RepRapFirmware on Duet3 6HC.
1 - Make sure to flash a debug version of the firmware before you even try to use ICE.
2 - Install 'OpenOCD' and configure it with 'duet3_openocd.cfg' from the RepRapFirmware repository.
3 - Replace the default debugger 'dbg.exe' with 'arm-none-eabi-gdb.exe'
4 - Make sure that the lock bits of the regions 0 to 40 are cleared. If you do a firmware upgrade those bits
will be set. Use Microchip Studio (+ATMEL-ICE) to clear those bits or flash your image with Microchip
Studio.
5 - Set the compiler optimization flag to -Os. (default is -Og).
Now it should work.
Posts made by LexJames
-
RE: Proper setup for debugging Duet3
-
RE: Proper setup for debugging Duet3
@Arplyu In case you want to verify your ICE, the ATMEL utility 'atprogram' has a nice selftest which allows you to test the wiring. You can run it from the command line.
-
RE: Proper setup for debugging Duet3
@dc42 That explains a lot. Thanks!
-
RE: Proper setup for debugging Duet3
@dc42 Sorry to ask you again about debugging the 6HC. I have a newer board v1.02 where SWD_EXT_RST is removed, so that can't be the problem. The fact that I don't see the 2 MHz SWCLK worries me. Is there anything I can verify (either hardware or software) to get a clue what is wrong? Thanks in advance.
-
RE: Proper setup for debugging Duet3
@Arplyu
I have exactly the same problems. Did you find a solution in the mean time? -
RE: Proper setup for debugging Duet3
@dc42 I went through the same process as Arplyu with the same results.
The target voltage is detected but I'm not able to read the device information (from microchip studio)
Looking at the SWCLK line I do not measure a clock, the line is permanently high.
The SWDIO line toggles between 0 and 3.3 volt every second. Reset seems to work.
I also created my own cable. The ATMEL-ICE is brand new so I assume it is ok.
Any hint is welcome, because I'm out of options. -
RE: Robotic kinematics
@JoergS5
I would be interested in some more explanation of the algorithms, so yes please, add them to the firmware page. -
RE: Robotic kinematics
Thanks for making this intermediate version.
I added some error handling and reporting (just for myself), because it is very easy to make mistakes in configuring the parameters.
I'm working on a simulation environment in CAD to be able to test without having hardware. I found one bug which you may want to repair. If you forget to define a printer (M669 B"<printer type>"), but still define C parameters, the cache will be indexed with a negative index. -
RE: Robotic kinematics
Thanks for the super fast response. Next Monday I will give it a try, but also try to understand your solution. I will start simple e.g. two axis and gradually add more axes till the 5 axes + extrusion are running synchronously. I'm especially interested in your generic approach because we will add 2 more axes in future (tilt and rotation of the extruder). Wish you lots of success with your prototype.
-
RE: Robotic kinematics
@JoergS5
Great ! I'm using a Duet3HC6 + 5x Duet Expansion 1XD, however if you check-in the source code, I can compile myself. Keep you updated on my findings. Thanks. -
RE: Robotic kinematics
@LexJames
Understand. Sorry to ask again about the timing because we have to decide to build on your generic solution versus building our own kinematics dedicated for our purpose. We prefer the first but do you need days, weeks, months...? -
RE: Robotic kinematics
@LexJames
Thanks for your prompt reply.
I will wait for the implementation based on Screw theory. Can you say something about the timing?
Can I help to speed things up? I don't have a development environment for Duet but I can test and develop in Windows.
Is there an old branch that worked for XYZAC?
Thanks again for all your good work. -
RE: Robotic kinematics
@JoergS5
Hi Joerg, we are building a 5 Axis printer, XYZAC, very close to robot type 'Open5x'. I was happy to see that you already did a huge amount of work to get robot kinematics work on Duet, so I would like to build on your work.
I took the sources from v3.5.0-beta.3 and added your 'RobotKinematics' files. With some minor updates I managed to generate a binary. Unfortunately the system crashes (reboot) when I try to set the D parameters. The configuration itself looks ok, but the crash occurs as soon as 'RobotKinematics::getForward' is called. I have the following questions:
1 - Did I take the correct set of sources
2 - Should robotType='Open5x' work with your code base of December 2022 ?
3 - If yes, can you give me some hints how to find out what I do wrong.
4 - If no, do you have any advice, what the best starting point is to develop the XYZAC kinematics.
Thanks in advance ,
Lex James