tedsalmon / BlueBus

A Bluetooth module for vehicles equipped with I-Bus
Other
169 stars 41 forks source link

Question: How to setup dev environment and project for bluebus? #76

Closed vgergiev closed 7 months ago

vgergiev commented 3 years ago

Hi everyone, I'm new to this type of development and curious on what is the proper way to setup an IDE/project to build a new version of the firmware.

I know that I need to install:

  1. MPLAB X: https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-ecosystem-downloads-archive
  2. XC16 compiler: https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-xc-compilers

But after installation on the new project screen, it asks me for family and device. Could someone please send me some guidance on how to open this repo in MPLAB IDE and build a new version of firmware? After that, I can compile a wiki page for this topic ;)

Sorry for asking such stupid questions, but don't know anything about embedded development.

Thank you in advance, Vlad

piersholt commented 3 years ago

@tedsalmon, I'm happy to look at this.

@vgergiev are you Windows or macOS?

vgergiev commented 3 years ago

Thank you! I'm using Windows.

On Fri, 30 Jul 2021 at 05:23, Piers Holt @.***> wrote:

@tedsalmon https://github.com/tedsalmon, I'm happy to look at this.

@vgergiev https://github.com/vgergiev are you Windows or macOS?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tedsalmon/BlueBus/issues/76#issuecomment-889580458, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHFBLJPTFCHBJCSVL627X3T2IEI7ANCNFSM5BGUU3HQ .

dertimaushh commented 3 years ago

Following this one closely - as I would also like to get into this topic :-)

piersholt commented 3 years ago

Okay, so, the BlueBus repository contains several interrelated projects.

You might be thinking this is self explanatory. I point it out as you might be used to cloning a git repository, pointing an IDE at it, and voilà, but that's not the case here.

It's the firmware we're interested in, so let's take a closer look at ./firmware!

You'll find the following directories:

Okay, so fun fact, there's actually two distinct pieces of software running on BlueBus. This is what we're seeing in this directory.

  1. bootloader is a bit like BIOS
  2. application is a bit like Windows

We only need to worry about application. That's the heart and soul of BlueBus- not discounting Ted, of course.

So, in summary, we care about ./firmware/application/

piersholt commented 3 years ago

Now, working under the assumption you've installed both MPLAB X and XC16...

You should see something like this appear:

bluebus_project
piersholt commented 3 years ago

I'd recommend ensuring you can get this far before I go into further detail. It might only be a couple of steps but with different platforms, software versions etc, it's worth checking there's no problems at this point.

vgergiev commented 3 years ago

@piersholt , thank you I was able to open the project with the same structure (don't know why but the "Open project" window was incredibly slow).

P.S. Sorry for the long reply, I was skydiving over the weekend :)

piersholt commented 3 years ago

Well, after skydiving, this shouldn't be too scary! 😄

Give me a day or two, then I'll go into more detail.

vgergiev commented 3 years ago

Hi @piersholt, Could you please give us the next part of the instructions? :)

tedsalmon commented 3 years ago

@vgergiev,

There's really not a whole lot more after you get to that point. You just need to ensure that you're using the right pack and xc16 compiler:

MPLAB_X

You also don't have to use MPLAB X for anything -- I compile the code via make clean && make and then upload it using the console_firmware_tool.py script.

Please let me know if you have any other questions :)

Thanks! -Ted cc @piersholt

tedsalmon commented 7 months ago

Closing as this is complete.