From caa5a6dc333864458beaae3c39cc7a002d610bdc Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 13 Sep 2020 18:01:47 -0400 Subject: [PATCH] Update mdloader official code to include printing of port_test ids and list which ids are supported by the code base ; add missing ids to lookup table --- README.md | 8 ++++++++ src_mdloader/mdloader_common.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index a2f98345..d41ea461 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,14 @@ A fork of the main [mdloader](https://github.com/Massdrop/mdloader) repo that ha - The ```firmware``` folder has pre-compiled firmware as well as screen shots of the board layout - The ```src_mdloader``` folder has a copy of the ```mdloader 1.0.3``` release +## Source Tweaks + +- This code has had the following chip id's added so others don't have to add them + - ```0x60060006``` + - ```0x60060305``` + - ```0x60060306``` + - ```0x60060005``` + ## Using To work with this repo build and run the ```mdloader``` tool with ```--list```. I have patched the code to show *all* of the chip ids for boards found. Once you have the chip id, edit ```mdloader_common.c``` and change the chip id as necessary. Rebuild the tool and run per the standard documentation. diff --git a/src_mdloader/mdloader_common.c b/src_mdloader/mdloader_common.c index bfe8b0df..3aea7055 100644 --- a/src_mdloader/mdloader_common.c +++ b/src_mdloader/mdloader_common.c @@ -36,6 +36,9 @@ mcu_t mcus[] = { //Name, Chip ID Chip ID, Program Memory, Data Memory, Program Addr, Data Addr // Address (FLASH_SIZE) (HSRAM_SIZE) (FLASH_ADDR) (HSRAM_ADDR) { "SAMD51J18A", 0x41002018, 0x60060006, 0x40000, 0x20000, 0x00000000, 0x20000000}, + { "SAMD51J18A", 0x41002018, 0x60060305, 0x40000, 0x20000, 0x00000000, 0x20000000}, + { "SAMD51J18A", 0x41002018, 0x60060306, 0x40000, 0x20000, 0x00000000, 0x20000000}, + { "SAMD51J18A", 0x41002018, 0x60060005, 0x40000, 0x20000, 0x00000000, 0x20000000}, }; mcu_t *mcu; //Pointer to mcus entry if found @@ -330,6 +333,7 @@ int test_mcu(char silent) { mcu = (mcu_t *)&mcus[mcu_index]; deviceid = read_word(mcu->cidr_addr); + printf("Devid id read from mcu->cidr_addr: %x\n", deviceid); if (read_error) { if (!silent && verbose) printf("Notice: Could not read device ID at %08X!\n", mcu->cidr_addr);