Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with Arch.....Teensy 4.0? #9

Open
blazini36 opened this issue Feb 6, 2021 · 2 comments
Open

Working with Arch.....Teensy 4.0? #9

blazini36 opened this issue Feb 6, 2021 · 2 comments

Comments

@blazini36
Copy link

blazini36 commented Feb 6, 2021

Not sure if these are distro issues, or just issues in general. Trying to follow the istructions @ https://mstrthealias.gitbook.io/teensy-fan-controller/build-instructions/setup, can't really get anywhere.

git clone https://github.com/mstrthealias/TeensyFanController.git
git submodule init
git submodule update

looks like it needs to be

git clone https://github.com/mstrthealias/TeensyFanController.git
cd TeensyFanController
git submodule init
git submodule update

However, $ git submodule update throws all sorts of publickey errors. Assuming that command wasn't 100% necessary:

~$ cd TeensyFanController/
TeensyFanController$ ARDUINO_DIR=/opt/Arduino make
Makefile:12: *** Invalid ARDUINO_DIR.  Stop.

Thats as far as I got with that. Trying to build the compile the Arduino project right in Arduino IDE didn't work either. (Using "Teensyduino"). Here I tried it with a board setup for Teensy 4.0 which I would hope to be able to use, but it failed for 3.x as well.

Arduino: 1.8.13 (Linux), TD: 1.53, Board: "Teensy 4.0, Serial, 600 MHz, Faster, US English"

In file included from /tmp/arduino_build_491770/sketch/runtime_config.h:20:0,
                 from /home/justin/TeensyFanController/teensy_fan_controller/src/src.ino:3:
/tmp/arduino_build_491770/sketch/runtime_config_v1.pb.h:6:16: fatal error: pb.h: No such file or directory
compilation terminated.
Error compiling for board Teensy 4.0.
@blazini36
Copy link
Author

Actually I got a bit further once I somewhat figured out what I was doing. Have to run "git init" here

git clone https://github.com/mstrthealias/TeensyFanController.git
git init
git submodule init
git submodule update

Also had to change the makefile targets a bit and provide the nanopb source, and manually create the working directories for whatever reason. I getting stuck on line 87 yet, not sure what to do here.

$ make                                                                                                                                                      1 ✘ 

Cleaning build...
rm -rf /home/justin/git/TeensyFanController/teensy_fan_controller/build/*
rm -f /home/justin/git/TeensyFanController/teensy_fan_controller/src/nanopb.proto
rm -f /home/justin/git/TeensyFanController/teensy_fan_controller/src/runtime_config_v1.pb.c
rm -f /home/justin/git/TeensyFanController/teensy_fan_controller/src/runtime_config_v1.pb.h

Cleaning project...
rm -rf /home/justin/git/TeensyFanController/teensy_fan_controller/libraries/nanopb
rm -rf /home/justin/git/TeensyFanController/teensy_fan_controller/libraries/EEPROM
rm -rf /home/justin/git/TeensyFanController/teensy_fan_controller/tools/*
rm -rf /home/justin/git/TeensyFanController/teensy_fan_controller/teensy3/*

Copy Teensy tools into project...
cp /usr/share/arduino/hardware/tools/teensy* /home/justin/git/TeensyFanController/teensy_fan_controller/tools/
cp /usr/share/arduino/hardware/tools/precompile_helper* /home/justin/git/TeensyFanController/teensy_fan_controller/tools/
cp /usr/share/arduino/hardware/tools/stdout_redirect* /home/justin/git/TeensyFanController/teensy_fan_controller/tools/
cp /usr/share/arduino/hardware/tools/mktinyfat* /home/justin/git/TeensyFanController/teensy_fan_controller/tools/
cp -a /usr/share/arduino/hardware/tools/arm /home/justin/git/TeensyFanController/teensy_fan_controller/tools/
touch /home/justin/git/TeensyFanController/teensy_fan_controller/tools/.gitkeep

Copy Teensy 3.x cores into project...
cp -a /usr/share/arduino/hardware/teensy/avr/cores/teensy3/* /home/justin/git/TeensyFanController/teensy_fan_controller/teensy3/
touch /home/justin/git/TeensyFanController/teensy_fan_controller/teensy3/.gitkeep

Copy libraries into project...
cp -a /usr/share/arduino/hardware/teensy/avr/libraries/EEPROM /home/justin/git/TeensyFanController/teensy_fan_controller/libraries/
touch /home/justin/git/TeensyFanController/teensy_fan_controller/libraries/EEPROM/.gitkeep
mkdir /home/justin/git/TeensyFanController/teensy_fan_controller/libraries/nanopb
cp /home/justin/git/TeensyFanController/nanopb/*.{h,c} /home/justin/git/TeensyFanController/teensy_fan_controller/libraries/nanopb/
touch /home/justin/git/TeensyFanController/teensy_fan_controller/libraries/nanopb/.gitkeep

Building protobufs
cp /home/justin/git/TeensyFanController/nanopb/generator/proto/nanopb.proto /home/justin/git/TeensyFanController/teensy_fan_controller/src/
proto_path=/home/justin/git/TeensyFanController/teensy_fan_controller/src/ --nanopb_out=/home/justin/git/TeensyFanController/teensy_fan_controller/src/ /home/justin/git/TeensyFanController/teensy_fan_controller/src/runtime_config_v1.proto
/bin/sh: line 1: --nanopb_out=/home/justin/git/TeensyFanController/teensy_fan_controller/src/: No such file or directory
make: [Makefile:87: runtime_config_v1.pb.c] Error 127 (ignored)

I realize that the makefile at least isn't configured for teensy4.x. I'd pick up a 3.x for now if I could at least get it built.

@mstrthealias
Copy link
Owner

Just came across your post today. What distro were you using, that-way I can diagnose the problem?

It looks like you may have just needed to mkdir teensy_fan_controller/src to avoid that error.

I did try the project on a Teensy 4 but had some issues with the RPMs being reported as twice the expected value; I suspect this issue is fixed in the Teensy libraries today. In order to support Teensy 4.1, you'd have to modify teensy_fan_controller/Makefile, set TEENSY=41, and add a block to the if statements to correct CPPFLAGS, LDSCRIPT, and LDFLAGS for the Teensy 4.1.

Thanks for trying the project, and sorry for the late response...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants