Git Repo Management - Tips?

So I think I’m missing something. Maybe the solution is to use the Amazon FreeRTOS Console but I’m curious what others are doing.

The top level repo is fairly big (https://github.com/aws/amazon-freertos) and includes lots of demo kits (including .msi install files).

I would like to just pull into our projects a couple libraries rather than the whole thing (like the C_SDK or even better just BLE and MQTT. I ideally I would like this to be like a submodule so I can watch for changes rather than a clone and own situation.

Any suggestions?

1 Like

Hi @billfrank,

The best way to get the code depends a bit on exactly what libraries you are planning to use. If you were only using MQTT, for example, the https://github.com/aws/aws-iot-device-sdk-embedded-C, specifically the v4_beta branch, only contains the C-SDK.

BLE features are part of our reference integrations in https://github.com/aws/amazon-freertos. That repository is quite large because it has to support all of our integrations. Cloning the whole thing is currently the only solution if you want to get the code through GitHub. Git just doesn’t have a good mechanism for distributing a fragment of a tree.

Downloading the source tree through the FreeRTOS section of the AWS Console will give you a subset of the aws/amazon-freertos tree in a ZIP file. Since the Console knows what board you’re using, and because it’s not git-based, it can give you a smaller tree without extra vendor toolchains.

We do have some work underway to make it easier to pull in a smaller units of code, though I don’t know if we’ll be able to make repositories for every library. If you don’t mind helping me do a little research, I have a few questions related to this work. What is it you like about the submodule approach? Would it work well for you if we had an easy to find release point with tarballs for individual modules in it? If distributed source through a source code package manager like NPM, would that be better or worse than a submodule for you?

Thanks for the fast response. I will look into the Console.

I can’t say that I’m super happy with the submodule approach honestly. After setup they require little extra effort by the typical developer which is what we need. We have talked for years about moving to a package manager but our embedded guys never want a new tool if they don’t need it - and so far just distributing source code through a package manager has always felt like an extra step or one more thing they need to manage. Honestly tho all I really care about is that it is something that is easy to use/maintain and scriptable such that our developers local and CI builds are the same. Maybe this is the final thing that would push us to using one. I personally do think long term it will be better.

1 Like

Thanks for the feedback!