AlmightyFrog / BuildEnvironmentATCMiThermometer

Build environment setup for ATC_MiThermometer
19 stars 9 forks source link

Make this a bit more git friendly #3

Closed martonmiklos closed 3 years ago

martonmiklos commented 3 years ago

Hi folks!

This patch/hack makes the project handling with git a bit cumbersome: https://github.com/AlmightyFrog/BuildEnvironmentATCMiThermometer/blob/469c559b1bdb7c923c389d2844e68044d567d90b/00_bootstrap.sh#L18

My suggestion would be the following: Cretate a separate mk file which:

This way I would need to alter back and forth the makefile before git commit.

AlmightyFrog commented 3 years ago

Hi, just that i get you right, so you mean i shall just copy the original makefile, patch it and then use it for compilation? If you've already done it at your system, feel free to show me a diff or add a PR.

What you see was just the quickest simplest aproach I could imagine to handle things and I am just ignoring that the one file is modified, so I am open to changes here of cause.

martonmiklos commented 3 years ago

Hey,

Well I think I figured out better. I modified the thermometer's makefile to set hte TEL_PATH with the ?= operator, removed the patch from this repo, and in the 01_make.sh I added an export TEL_PATH= ../../SDK

At the moment I think this is the most elegant way, so I will submit a PR here and the thermometer's repo as well.

AlmightyFrog commented 3 years ago

Hi, please excuse for late reply. Your changes seem to work fine. I did verify that your changes work at my PC for compiling, but currently can't easily verify binary still working properly on Thermometer. But and as you also already did some improvements of code quality on ATCWatch repo, the changes here are only minor and compilation finishes i guess it should work.

Thank you very much for your effort here and in the ATCWatch repo for improving the code @martonmiklos. I sent you an invitation as collaborator for this repo so that you can in future more easily update something if necessary.

Just a side question: Are you maybe interested in using some further I/O on the MCU (digital read state) in general? I am not knowing this processor at all, but want to have 1-2 contacts for e.g. window open/close state also reported. Rough I/O mapping of testing points from MCU to testpoints in PCB i did already measure, but not sure how to continue in code...

Best regards and thanks again

martonmiklos commented 3 years ago

Hello,

please excuse for late reply. No worries!

I did verify that your changes work at my PC for compiling, but currently can't easily verify binary still working properly on Thermometer.

Do a checkout on a known to be working state from the Thermometer repo

  1. Compile it with the patching BuildEnv approach
  2. Calculate md5sum on the binary
  3. Checkout the exported approach from the BuildEnv
  4. Calculate md5sum on the binary

If md5sum between 2 and 4 equals then we are good.

Just a side question: Are you maybe interested in using some further I/O on the MCU (digital read state) in general? I am not knowing this processor at all, but want to have 1-2 contacts for e.g. window open/close state also reported. Rough I/O mapping of testing points from MCU to testpoints in PCB i did already measure, but not sure how to continue in code...

At the moment I am still waiting for my thermometers to arrive. Once they will be here, I am open to any kind of hacking :smile: