Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-build-pic32cx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test PIC32CZ and PIC32CK Build

on:
push:
branches: [main]
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [main]
branches: [ '*' ]

jobs:
build-pic32cz:
Expand Down
10 changes: 8 additions & 2 deletions docs/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -1609,6 +1609,8 @@ Identify the correct JLink device for your PIC32CK. In the examples the model is
q
```

3. Disconnect USB debugger and power cycle board. LED0 will illuminate (indicating version 1). Hit reset button and LED1 will illumate (indicating version 2).
Comment thread
danielinux marked this conversation as resolved.
Outdated

### Programming with MPlab IPE

In order to program using the MPlab IPE, you need to create the hex files for wolfBoot, and the signed application images:
Expand All @@ -1619,12 +1621,14 @@ arm-none-eabi-objcopy -I binary -O ihex --change-addresses=0x0C000000 test-app/i
arm-none-eabi-objcopy -I binary -O ihex --change-addresses=0x0C07F000 test-app/image_v2_signed.bin image_v2_signed.hex
```

then enable advanced setting in the MPLAB IPE GUI, and enable the "Allow Import Multiple Hex file" option in the Production view.
Then enable advanced setting in the MPLAB IPE GUI, and enable the "Allow Import Multiple Hex file" option in the Production view.
Comment thread
danielinux marked this conversation as resolved.
Outdated
Once the option is enabled, load the hex files into the MPLAB IPE GUI (File -> Import -> Multiple hex) and program the device.

### Behavior During Testing

- The application version 1 will boot first. The application will trigger the update and light LED0. On the next reset, wolfBoot will update the application, boot application version 2, and turn on LED1.


## Microchip PIC32CZ
Comment thread
dgarske marked this conversation as resolved.

The PIC32CZ is a high-performance 32-bit microcontroller family from Microchip featuring an ARM Cortex-M7 core. wolfBoot has been tested on the PIC32CZCA91 Curiosity board, which has GPIO pins PB21 and PB22 connected to LED0 and LED1, respectively, for status indication.
Expand Down Expand Up @@ -1677,6 +1681,8 @@ Identify the correct JLink device for your PIC32CZ board. In the examples the mo
q
```

3. Disconnect USB debugger and power cycle board. LED0 will illuminate (indicating version 1). Hit reset button and LED1 will illumate (indicating version 2).
Comment thread
danielinux marked this conversation as resolved.
Outdated

### Programming with MPLAB IPE

In order to program using the MPLAB IPE, you need to create the hex files for wolfBoot, and the signed application images:
Expand All @@ -1687,7 +1693,7 @@ arm-none-eabi-objcopy -I binary -O ihex --change-addresses=0x0C000000 test-app/i
arm-none-eabi-objcopy -I binary -O ihex --change-addresses=0x0C200000 test-app/image_v2_signed.bin image_v2_signed.hex
```

then enable advanced setting in the MPLAB IPE GUI, and enable the "Allow Import Multiple Hex file" option in the Production view.
Then enable advanced setting in the MPLAB IPE GUI, and enable the "Allow Import Multiple Hex file" option in the Production view.
Comment thread
danielinux marked this conversation as resolved.
Outdated
Once the option is enabled, load the hex files into the MPLAB IPE GUI (File -> Import -> Multiple hex) and program the device.

### Behavior During Testing
Expand Down
11 changes: 7 additions & 4 deletions test-app/app_pic32ck.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,19 @@
#define PORTD_OUTCLR (*(volatile uint32_t *)(PORTD_BASE + 0x14))
#define PORTD_OUTCLR_OUT(X) (1 << (X))

#define LED0_PIN (20)
#define LED1_PIN (25)

static void led0_on(void)
{
PORTD_DIRSET = PORTD_DIRSET_OUT(20);
PORTD_OUTCLR = PORTD_OUTCLR_OUT(20);
PORTD_DIRSET = PORTD_DIRSET_OUT(LED0_PIN);
PORTD_OUTCLR = PORTD_OUTCLR_OUT(LED0_PIN);
}

static void led1_on(void)
{
PORTB_DIRSET = PORTB_DIRSET_OUT(25);
PORTB_OUTCLR = PORTB_OUTCLR_OUT(25);
PORTB_DIRSET = PORTB_DIRSET_OUT(LED1_PIN);
PORTB_OUTCLR = PORTB_OUTCLR_OUT(LED1_PIN);
}

void main(void)
Expand Down
11 changes: 7 additions & 4 deletions test-app/app_pic32cz.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@
#define PORTB_OUTCLR (*(volatile uint32_t *)(PORTB_BASE + 0x14))
#define PORTB_OUTCLR_OUT(X) (1 << (X))

#define LED0_PIN 21
#define LED1_PIN 22

static void led0_on(void)
{
PORTB_DIRSET = PORTB_DIRSET_OUT(21);
PORTB_OUTCLR = PORTB_OUTCLR_OUT(21);
PORTB_DIRSET = PORTB_DIRSET_OUT(LED0_PIN);
PORTB_OUTCLR = PORTB_OUTCLR_OUT(LED0_PIN);
}

static void led1_on(void)
{
PORTB_DIRSET = PORTB_DIRSET_OUT(22);
PORTB_OUTCLR = PORTB_OUTCLR_OUT(22);
PORTB_DIRSET = PORTB_DIRSET_OUT(LED1_PIN);
PORTB_OUTCLR = PORTB_OUTCLR_OUT(LED1_PIN);
}

void main(void)
Expand Down