jakkra / ZSWatch

ZSWatch - the Open Source Zephyrâ„¢ based Smartwatch, including both HW and FW.
https://forms.gle/G48Sm5zDe9aCaYtT9
GNU General Public License v3.0
2.31k stars 197 forks source link

Setup dev container for ZSWatch development environment #203

Open Kampi opened 9 months ago

Kampi commented 9 months ago

ToDo

Open issues

Unplugging the programmer and reconnecting with WSL brick USB in the container. Find a way to fix it image

Shall we use GDB with the JLink GDB Server as replacement because TCP works better than USB?

Pro:

Contra:

jakkra commented 9 months ago

AStyle 3.1 I got from apt-get

Rayvert64 commented 2 months ago

It seems like this is started, but I can't seem to find a branch/pull request for this. I can help set it up, I was going to do this anyways for my own setup of this project. 🙂

I'll just start on my end and do a pull request if need be 🙂.

jakkra commented 2 months ago

It seems like this is started, but I can't seem to find a branch/pull request for this. I can help set it up, I was going to do this anyways for my own setup of this project. 🙂

I'll just start on my end and do a pull request if need be 🙂.

Hi, this is the PR we abandoned https://github.com/jakkra/ZSWatch/pull/211

There where too many tradeoffs etc. making the container harder to use than just installing with the nRF tools (which IMO is easy). What I remember, debugging requires starting a GDB server and having extra handling for it in VScode etc. and other quirks.

I'd say don't spend too much time on it, as it turned out quite messy for us to get it running well without tradeoffs.

Kampi commented 2 months ago

As @jakkra mentioned. But you can check out the branch on my GitHub if you want.

Rayvert64 commented 2 months ago

Cool thanks @Kampi, but for now I'll just set it up on my side. :)

I'll try to rework it myself for now without looking at your solution unless I get desperate hahaha. If I have a good potential solution for most people, then I might do a pull request.

If I do one though, my guess is that it will probably be something more like template files?(We used to do this at my old workplace) Perhaps that could be a decent solution, as it puts a bit less of a burden of responsibility for you guys. Would you guys be open to that?

jakkra commented 2 months ago

@Rayvert64 I guess so, I don't have any specific idea how to do it. IMO it's not really needed as I think using nRF toolchain is easy and reliable. But if you can come up with something nice sure go ahead.

Kampi commented 2 months ago

@Rayvert64 what do you mean with template?

Rayvert64 commented 2 months ago

I mean having files that the user has to copy/edit to set up their files. For example, a .env.template file and a devcontainer.json.template file. These two files you would track, but you wouldn't track the actual .env and devcontainer.jsonfiles. So the template files are a bit more of a "here's a starting point, most people who edit these should get a devcontainer to work."

I know it kinda defeats the "point" of a devcontainer in terms of you can "just start to code," but I don't think I've ever seen a devcontainer not need at least a bit of configuration to get working. 🫠

I don't use them for that purpose, though. I simply use them to keep my actual system "lean." 😅