BlueBus icon indicating copy to clipboard operation
BlueBus copied to clipboard

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

Open vgergiev opened this issue 4 years ago • 10 comments

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

vgergiev avatar Jul 29 '21 14:07 vgergiev

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

@vgergiev are you Windows or macOS?

piersholt avatar Jul 30 '21 02:07 piersholt

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 .

vgergiev avatar Jul 30 '21 06:07 vgergiev

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

dertimaushh avatar Jul 30 '21 07:07 dertimaushh

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

  • ./enclosure is the BlueBus 3D printed case
  • ./firmware is the BlueBus software
  • ./hardware is the BlueBus PCB
  • ./utility is the BlueBus firmware utility

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:

  • ./firmware/application
  • ./firmware/bootloader

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 avatar Jul 31 '21 05:07 piersholt

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

  • open the IDE
  • select File > Open Project...
  • navigate to your local copy of the BlueBus repository
  • drill down to ./firmware/application
  • select Open

You should see something like this appear:

bluebus_project

piersholt avatar Jul 31 '21 05:07 piersholt

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.

piersholt avatar Jul 31 '21 05:07 piersholt

@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 :)

vgergiev avatar Aug 02 '21 13:08 vgergiev

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

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

piersholt avatar Aug 04 '21 05:08 piersholt

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

vgergiev avatar Aug 18 '21 13:08 vgergiev

@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 avatar Aug 27 '21 00:08 tedsalmon

Closing as this is complete.

tedsalmon avatar Jan 28 '24 16:01 tedsalmon