matthewSorensen / k20-grbl-port

A port of grbl to Freescale K20 quo teensy3.0. Requires minimal-k20-env to supply vendor directory for compiles. Will eventually be fused into one.
GNU Lesser General Public License v3.0
11 stars 4 forks source link

T3 compile error pin_config.h #7

Open LotusPack opened 9 years ago

LotusPack commented 9 years ago

Hi Matthew I am not very experienced in library code programming on the Teensy but would really appreciate a guide on how to make the grbl port work on my T3. I have tried to sort out the above error and found that there is a missing section in the K20 config.h file for pin assignments, replaced with #define PIN_MAP_ARDUINO_UNO. Which puts my understanding up against a brick wall as pin_config.h seems to elude me completely.

I get this error: C:\Users\Paul\Documents\Arduino\libraries\k20-grbl-port-k20\coolant_control.c:26:24: fatal error: pin_config.h: No such file or directory compilation terminated.

Do I need to run a compile on the library for another compiler not Arduino sketch compile? Regards LP

matthewSorensen commented 9 years ago

Ah, I should probably actually through together proper documentation for the build procedure. Due to some weird linker magic (weak symbols in ISR declarations), k20 grbl can't be compiled via the IDE.

First off, this repo is here for historical reasons etc, and so all future development will take place on my k20 and edge-k20 branches, which (loosely) track master and edge, respectively.

Once you've cloned the appropriate repo, edit line 35 of the Makefile to point to your teensy 3.1 toolchain location, and compile via the Makefile, not the IDE.

(...also, sorry for the latency on the response...)

LotusPack commented 9 years ago

Hi Matthew, Afraid I don't yet understand the process to compile via the Makefile. My questions were; Surely there must be a compiler somewhere to create the objects and link them to the K20 libraries? or will the Arduino complier handle all this? In the meantime, to try to figure out how it all works. I have downloaded the edge-k20 branch but still struggling to download the Sourcery CodeBench IDE libraries for the K20 using this bare-metal example http://www.seanet.com/~karllunt/bareteensy31.html. I do want to use Visual Studio 2008 as my IDE and if I can get blinky example to work on my development setup then I will have all my files and paths straight.

I will get there in the end and when I get to grips with the K20 development, this will be part of a Mach3 G-code interpreter replacement because it is really unreliable. I am a precision engineer and application developer, I have CNC lathes and mills, and a test rig in my workshop to test the program. My objective is to understand the code fully and then as well as all the standard stuff, Jogging, ATC, etc. enhance the code to support a 'closed loop' encoder feedback position verification/adjustment and axis pressure measurement sensors. Recon the K20 has the space and power to do this. No worries on the time to do this as I have put the next 6 months aside in my spare time for the project.

matthewSorensen commented 9 years ago

Yes - the compiler comes from the teensy/arduino IDE, but instead of invoking it through the IDE by compiling it as an library or sketch, it is invoked directly through the Makefile. All of the necessary library files are included in the vendor/ directory.

In a roundabout way, I've been working on closed loop CNC running on Teensys - although the solution I worked on involves a network of multiple teensys each controlling one axis. Here's the closed-loop codebase, which has rather neat control algorithm that could be ported to the standard 3-axis k20 grbl.