How difficult is it to make a branch of this Github project and then compile? - Page 1
Forum section: electronics / general

author: Jester
author_rank: Frequent Contributor
timestamp: December 06, 2021, 11:40:11 pm
content: Hi,I'm an engineer not a programmer so out of my comfort zone beyond simple c type programming.A while back I designed a custom PCB similar to Arduino MKRZERO, initially I used the same uC, a SAMD21G18. I wrote a fairly extensive program based on a custom board variant and had the whole thing working tickety-boo.Fast forward to Covid and supply line disruptions and chip shortages I could not get the SAMD21G18 parts so I moved to the SAMD21G17. I built one of my custom boards with the 17 variation and the problem I have is that when Arduino attempts to load the main program via the bootloader (using the open source bossac uploader), bossac does not recognize the G17 chip ID 0x10010093 and quits with an unrecognized chip ID message.I know for a fact my code compiles and works because as a work around I compiled a no bootloader version and loaded it using atmel studio and a Segger programmer. The problem is I need to do further development and would like to simply do it using Arduino do update the board using the normal bootloader that uses bossac via the USB port (just like a conventional Arduino board and the way I was doing it when I had the G18A parts.)A bit of google searching and bossa, and bossac are open source and available here:https://github.com/mattairtech/ArduinoCore-samdIt looks like the latest version actually supports some varieties of the SAMD21G17A, just not the one I'm using. I'm pretty sure if I just added one line to device.cpp and then compiled bossa for Win7, my problem would be solved.case 0x10010001: // J17Acase 0x10010006: // G17Acase 0x10010093: // G17D 128KB FLASH 48TQFP<--- this is the new line required at about line 456 in devices.cpp there are 4 instances of G17A, however all have different chip ID'scase 0x1001000b: // E17Acase 0x10010010: // G17A WLCSP_family = FAMILY_SAMD21;flashPtr = new D2xNvmFlash(_samba, "ATSAMD21x17", 2048, 64, 0x20002000, 0x20004000) ;break;I think but I'm not sure the project needs to be compiled on a Linux machine, and I work strictly on Win7 (64 )So for you Linux and Github savvy programmers, what do you suggest?

author: Whales
author_rank: Super Contributor
timestamp: December 07, 2021, 12:04:18 am
content: You don't actually need to make a "branch" unless you intend to submit your changes back to github. Downloading the code and editing it enough.It looks like this project might use theplatformio frameworkfor building and compiling. A bit annoying that it doesn't say it directly. (I'll also add a quibble about the PIO website itself being stupid, "professional collaborative framework" tells people nothing about what it actually does, it took me way to much effort to work out how their stuff actually functions).QuoteCan you just get an updated version of bossa? Never used that tool, sorry.

author: westfw
author_rank: Super Contributor
timestamp: December 07, 2021, 10:40:11 am
content: Getting the code is easy; just use GitHub to download the .zip file.Compiling, otoh, looks to be painful. There is a makefile that checks for mingw32, so…Install mingw32 with C and C+c compilers. Install wswidgets for mingw32. Install any other dependencies.Compile using make. (I tried, and gave up at the wxwidgets step…)