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

build: add Makefile for arduino-less environment #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paulfertser
Copy link

Hello goebish,

First of all, thank you for making this project free software!

Let me explain my motivation behind this proposal. I would really like to be able to build your firmware without the Arduino IDE (cloning a copy of their libraries is not a problem). I assumed that you're targetting arduino nano board (with atmega32u chip) so I wrote a suitable Makefile. As you can see, treatment of .ino files is a bit hackish, and I had to make some minimal changes to the codebase to make it compile. I would prefer to convert all .ino files to .cpp properly and get rid of the "prototypes.h" hackery, so if you say you might accept such a proposal, I can prepare it shortly.

My next step is to port the code to the "bluepill" stm32f103 board, and I have already managed to build it (with PPM decoding commented out). And then I'm planning on trying to merge this with https://github.com/paulfertser/stm32-tx-hid functionality to be able to use any simple toy Tx to control models.

Please let me know what you think.

If you prefer to contact me via e-mail or IRC, please feel free to.

Have a nice day and happy hacking.

@paulfertser
Copy link
Author

(Of course, I meant arduino micro, the one with hardware usb, not nano. If you actually use nano, I'll change the makefile accordingly)

@goebish
Copy link
Owner

goebish commented Oct 27, 2017

It's meant for the pro mini, so atmega328p ;)
I'll check that there is no problem with your changes during the week end.

@paulfertser
Copy link
Author

Ok, I'll change the Makefile and push the updated version today. Please advice me on whether you can in theory be interested in me converting ino files to cpp, if that is acceptable to you (afaik arduino IDE won't have any problems compiling them).

@paulfertser
Copy link
Author

BTW, with LTO enabled the resulting binary:

$ avr-size nRF24_multipro.elf 
   text	   data	    bss	    dec	    hex	filename
  20548	    470	    517	  21535	   541f	nRF24_multipro.elf

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

Successfully merging this pull request may close these issues.

2 participants