|
1 | 1 | #include "boards.h"
|
2 | 2 | #include "dfu_types.h"
|
3 | 3 |
|
4 |
| -// Family ID for updating generic Application |
5 |
| -#if defined(NRF52833_XXAA) |
6 |
| - #define CFG_UF2_FAMILY_APP_ID 0x621E937A |
7 |
| -#elif defined(NRF52840_XXAA) |
8 |
| - #define CFG_UF2_FAMILY_APP_ID 0xADA52840 |
9 |
| -#endif |
| 4 | +// Virtual disk size: just under 32MB |
| 5 | +#define CFG_UF2_NUM_BLOCKS 0x10109 |
| 6 | + |
| 7 | +// Family ID for updating Bootloader |
| 8 | +#define CFG_UF2_FAMILY_BOOT_ID 0xd663823c |
10 | 9 |
|
11 | 10 | // Board-specific ID for board-specific Application
|
12 | 11 | #if defined(USB_DESC_VID) && defined(USB_DESC_UF2_PID) && USB_DESC_VID && USB_DESC_UF2_PID
|
13 | 12 | #define CFG_UF2_BOARD_APP_ID ((USB_DESC_VID << 16) | USB_DESC_UF2_PID)
|
14 | 13 | #endif
|
15 | 14 |
|
16 |
| - |
17 |
| -// Family ID for updating Bootloader |
18 |
| -#define CFG_UF2_FAMILY_BOOT_ID 0xd663823c |
19 |
| - |
20 |
| -#define CFG_UF2_NUM_BLOCKS 0x10109 // just under 32MB |
| 15 | +// Family ID and size for updating generic Application |
21 | 16 | #if defined(NRF52833_XXAA)
|
22 |
| - #define CFG_UF2_FLASH_SIZE 0x80000 // 512 kB |
23 |
| -#else |
24 |
| - #define CFG_UF2_FLASH_SIZE (1024*1024) // 1 MB |
| 17 | + #define CFG_UF2_FAMILY_APP_ID 0x621E937A |
| 18 | + #define CFG_UF2_FLASH_SIZE (512*1024) // 512 kB |
| 19 | +#elif defined(NRF52840_XXAA) |
| 20 | + #define CFG_UF2_FAMILY_APP_ID 0xADA52840 |
| 21 | + #define CFG_UF2_FLASH_SIZE (1024*1024) // 1 MB |
25 | 22 | #endif
|
26 | 23 |
|
27 | 24 | // Application Address Space
|
28 |
| -#define USER_FLASH_START MBR_SIZE // skip MBR included in SD hex |
29 |
| -#define USER_FLASH_END (BOOTLOADER_REGION_START - DFU_APP_DATA_RESERVED) |
| 25 | +#define USER_FLASH_START MBR_SIZE // skip MBR included in SD hex |
| 26 | +#define USER_FLASH_END (BOOTLOADER_REGION_START - DFU_APP_DATA_RESERVED) |
30 | 27 |
|
31 | 28 | // Bootloader start address
|
32 | 29 | #define BOOTLOADER_ADDR_START BOOTLOADER_REGION_START
|
|
0 commit comments