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

This commit is contained in:
KemoNine 2020-09-13 18:01:47 -04:00
parent 56b648a5ff
commit caa5a6dc33
2 changed files with 12 additions and 0 deletions

View File

@ -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.

View File

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