Compare commits
6 Commits
release_v0
...
experiment
| Author | SHA1 | Date | |
|---|---|---|---|
| 6029ebb02d | |||
| 9b64d7d3cd | |||
| 8ca0846538 | |||
| afe184442d | |||
| ad99d94a35 | |||
| e724165416 |
@@ -32,10 +32,13 @@ The bootloader is also capable of programming an entirely new application to the
|
|||||||
1. Download the latest release of the firmware update utility from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases).
|
1. Download the latest release of the firmware update utility from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw_flash_utility/releases).
|
||||||
2. Download the latest version of the application from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases). This will be a file with the extension ".hex".
|
2. Download the latest version of the application from [https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases](https://source.jojcorp.com/bia-microddr/bia_microddr_fw/releases). This will be a file with the extension ".hex".
|
||||||
3. Connect the device to be updated to the computer now if you have not already done so. **DO NOT CONNECT MORE THAN 1 BIA DEVICE WHILE UPDATING FIRMWARE!**
|
3. Connect the device to be updated to the computer now if you have not already done so. **DO NOT CONNECT MORE THAN 1 BIA DEVICE WHILE UPDATING FIRMWARE!**
|
||||||
|
|
||||||

|

|
||||||
4. Run the firmware update utility and it will notify you that it must put the device in firmware update mode. Click "OK" to continue. The device will very briefly disconnect from the PC and reconnect in firmware update mode. The utility should now display the device as "Connected".
|
4. Run the firmware update utility and it will notify you that it must put the device in firmware update mode. Click "OK" to continue. The device will very briefly disconnect from the PC and reconnect in firmware update mode. The utility should now display the device as "Connected".
|
||||||
5. Click the "Browse" button under "Step 2: Select App FW File" and open the ".hex" application firmware file you downloaded.
|
5. Click the "Browse" button under "Step 2: Select App FW File" and open the ".hex" application firmware file you downloaded.
|
||||||
|
|
||||||

|

|
||||||
6. Click the "FLASH FIRMWARE NOW" button. The utility will begin updating the application firmware on the device and will open a message dialog to notify you when the update is complete. This should not take more than a few seconds.
|
6. Click the "FLASH FIRMWARE NOW" button. The utility will begin updating the application firmware on the device and will open a message dialog to notify you when the update is complete. This should not take more than a few seconds.
|
||||||
|
|
||||||

|

|
||||||
7. Click "Yes" on the dialog to reset the device or disconnect and reconnect it to boot into the new application firmware.
|
7. Click "Yes" on the dialog to reset the device or disconnect and reconnect it to boot into the new application firmware.
|
||||||
@@ -25,17 +25,18 @@
|
|||||||
//#include "usb.h"
|
//#include "usb.h"
|
||||||
|
|
||||||
|
|
||||||
// PIC18F4550 Configuration Bit Settings
|
|
||||||
|
// PIC18F2550 Configuration Bit Settings
|
||||||
|
|
||||||
// 'C' source line config statements
|
// 'C' source line config statements
|
||||||
|
|
||||||
// CONFIG1L
|
// CONFIG1L
|
||||||
#pragma config PLLDIV = 3 // PLL Prescaler Selection bits (Divide by 3 (12 MHz oscillator input))
|
#pragma config PLLDIV = 1 // PLL Prescaler Selection bits (No prescale (4 MHz oscillator input drives PLL directly))
|
||||||
#pragma config CPUDIV = OSC2_PLL3// System Clock Postscaler Selection bits ([Primary Oscillator Src: /4][96 MHz PLL Src: /6])
|
#pragma config CPUDIV = OSC3_PLL4// System Clock Postscaler Selection bits ([Primary Oscillator Src: /3][96 MHz PLL Src: /4])
|
||||||
#pragma config USBDIV = 2 // USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1) (USB clock source comes from the 96 MHz PLL divided by 2)
|
#pragma config USBDIV = 2 // USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1) (USB clock source comes from the 96 MHz PLL divided by 2)
|
||||||
|
|
||||||
// CONFIG1H
|
// CONFIG1H
|
||||||
#pragma config FOSC = HS // Oscillator Selection bits (HS oscillator (HS))
|
#pragma config FOSC = HSPLL_HS // Oscillator Selection bits (HS oscillator, PLL enabled (HSPLL))
|
||||||
#pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor disabled)
|
#pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor disabled)
|
||||||
#pragma config IESO = OFF // Internal/External Oscillator Switchover bit (Oscillator Switchover mode disabled)
|
#pragma config IESO = OFF // Internal/External Oscillator Switchover bit (Oscillator Switchover mode disabled)
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
#pragma config PWRT = OFF // Power-up Timer Enable bit (PWRT disabled)
|
#pragma config PWRT = OFF // Power-up Timer Enable bit (PWRT disabled)
|
||||||
#pragma config BOR = ON // Brown-out Reset Enable bits (Brown-out Reset enabled in hardware only (SBOREN is disabled))
|
#pragma config BOR = ON // Brown-out Reset Enable bits (Brown-out Reset enabled in hardware only (SBOREN is disabled))
|
||||||
#pragma config BORV = 3 // Brown-out Reset Voltage bits (Minimum setting 2.05V)
|
#pragma config BORV = 3 // Brown-out Reset Voltage bits (Minimum setting 2.05V)
|
||||||
#pragma config VREGEN = ON // USB Voltage Regulator Enable bit (USB voltage regulator enabled)
|
#pragma config VREGEN = OFF // USB Voltage Regulator Enable bit (USB voltage regulator disabled)
|
||||||
|
|
||||||
// CONFIG2H
|
// CONFIG2H
|
||||||
#pragma config WDT = OFF // Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
|
#pragma config WDT = OFF // Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
|
||||||
@@ -58,9 +59,6 @@
|
|||||||
// CONFIG4L
|
// CONFIG4L
|
||||||
#pragma config STVREN = ON // Stack Full/Underflow Reset Enable bit (Stack full/underflow will cause Reset)
|
#pragma config STVREN = ON // Stack Full/Underflow Reset Enable bit (Stack full/underflow will cause Reset)
|
||||||
#pragma config LVP = OFF // Single-Supply ICSP Enable bit (Single-Supply ICSP disabled)
|
#pragma config LVP = OFF // Single-Supply ICSP Enable bit (Single-Supply ICSP disabled)
|
||||||
#ifdef PIC18F4550
|
|
||||||
#pragma config ICPRT = OFF // Dedicated In-Circuit Debug/Programming Port (ICPORT) Enable bit (ICPORT disabled)
|
|
||||||
#endif
|
|
||||||
#pragma config XINST = OFF // Extended Instruction Set Enable bit (Instruction set extension and Indexed Addressing mode disabled (Legacy mode))
|
#pragma config XINST = OFF // Extended Instruction Set Enable bit (Instruction set extension and Indexed Addressing mode disabled (Legacy mode))
|
||||||
|
|
||||||
// CONFIG5L
|
// CONFIG5L
|
||||||
@@ -97,3 +95,5 @@
|
|||||||
// Use project enums instead of #define for ON and OFF.
|
// Use project enums instead of #define for ON and OFF.
|
||||||
|
|
||||||
#include <xc.h>
|
#include <xc.h>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,21 @@
|
|||||||
<archiverTool>
|
<archiverTool>
|
||||||
</archiverTool>
|
</archiverTool>
|
||||||
<loading>
|
<loading>
|
||||||
<loadableFile>../../bootloader/bia_microddr_bootloader.X/dist/default/production/bia_microddr_bootloader.X.production.hex</loadableFile>
|
<makeArtifact PL="../../bootloader/bia_microddr_bootloader.X"
|
||||||
|
CT="1"
|
||||||
|
CN="default"
|
||||||
|
AC="true"
|
||||||
|
BL="true"
|
||||||
|
WD="../../bootloader/bia_microddr_bootloader.X"
|
||||||
|
BC="${MAKE} -f Makefile CONF=default"
|
||||||
|
DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
||||||
|
CC="rm -rf "build/default" "dist/default""
|
||||||
|
OP="dist/default/production/bia_microddr_bootloader.X.production.hex"
|
||||||
|
DOP="dist/default/debug/bia_microddr_bootloader.X.debug.elf"
|
||||||
|
FL="dist/default/production/bia_microddr_bootloader.X.production.hex"
|
||||||
|
PD="dist/default/production/bia_microddr_bootloader.X.production.elf"
|
||||||
|
DD="dist/default/debug/bia_microddr_bootloader.X.debug.elf">
|
||||||
|
</makeArtifact>
|
||||||
<useAlternateLoadableFile>false</useAlternateLoadableFile>
|
<useAlternateLoadableFile>false</useAlternateLoadableFile>
|
||||||
<parseOnProdLoad>false</parseOnProdLoad>
|
<parseOnProdLoad>false</parseOnProdLoad>
|
||||||
<alternateLoadableFile></alternateLoadableFile>
|
<alternateLoadableFile></alternateLoadableFile>
|
||||||
@@ -225,7 +239,6 @@
|
|||||||
value="Press to browse for a specific firmware version"/>
|
value="Press to browse for a specific firmware version"/>
|
||||||
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
|
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
|
||||||
<property key="debugoptions.useswbreakpoints" value="false"/>
|
<property key="debugoptions.useswbreakpoints" value="false"/>
|
||||||
<property key="firmware.download.all" value="false"/>
|
|
||||||
<property key="hwtoolclock.frcindebug" value="false"/>
|
<property key="hwtoolclock.frcindebug" value="false"/>
|
||||||
<property key="memories.aux" value="false"/>
|
<property key="memories.aux" value="false"/>
|
||||||
<property key="memories.bootflash" value="true"/>
|
<property key="memories.bootflash" value="true"/>
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
<header-extensions>h</header-extensions>
|
<header-extensions>h</header-extensions>
|
||||||
<asminc-extensions/>
|
<asminc-extensions/>
|
||||||
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
<sourceEncoding>ISO-8859-1</sourceEncoding>
|
||||||
<make-dep-projects/>
|
<make-dep-projects>
|
||||||
|
<make-dep-project>../../bootloader/bia_microddr_bootloader.X</make-dep-project>
|
||||||
|
</make-dep-projects>
|
||||||
<sourceRootList>
|
<sourceRootList>
|
||||||
<sourceRootElem>../src</sourceRootElem>
|
<sourceRootElem>../src</sourceRootElem>
|
||||||
<sourceRootElem>../framework</sourceRootElem>
|
<sourceRootElem>../framework</sourceRootElem>
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ state according to the definition in the USB specification.
|
|||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "usb_device_hid.h"
|
#include "usb_device_hid.h"
|
||||||
|
|
||||||
|
// 0xECEE = pad interface 1, 0xECE5 = pad interface 2
|
||||||
|
#define USB_DEVICE_PID 0xECEE
|
||||||
|
|
||||||
/** CONSTANTS ******************************************************/
|
/** CONSTANTS ******************************************************/
|
||||||
#if defined(COMPILER_MPLAB_C18)
|
#if defined(COMPILER_MPLAB_C18)
|
||||||
#pragma romdata
|
#pragma romdata
|
||||||
@@ -157,7 +160,7 @@ const USB_DEVICE_DESCRIPTOR device_dsc=
|
|||||||
0x00, // Protocol code
|
0x00, // Protocol code
|
||||||
USB_EP0_BUFF_SIZE, // Max packet size for EP0, see usb_config.h
|
USB_EP0_BUFF_SIZE, // Max packet size for EP0, see usb_config.h
|
||||||
0x04D8, // Vendor ID, see usb_config.h
|
0x04D8, // Vendor ID, see usb_config.h
|
||||||
0xECEE, // Product ID, see usb_config.h
|
USB_DEVICE_PID, // Product ID, see usb_config.h
|
||||||
0x0001, // Device release number in BCD format
|
0x0001, // Device release number in BCD format
|
||||||
0x01, // Manufacturer string index
|
0x01, // Manufacturer string index
|
||||||
0x02, // Product string index
|
0x02, // Product string index
|
||||||
|
|||||||
@@ -6,11 +6,17 @@ if not len(sys.argv) > 1:
|
|||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
instr = ' '.join(sys.argv[1:])
|
instr = ' '.join(sys.argv[1:])
|
||||||
count = 0
|
count = len(instr)
|
||||||
print('')
|
print('')
|
||||||
|
print(f"num characters: {count}")
|
||||||
|
print('## ASCII ##')
|
||||||
|
print(f"size: {count} bytes")
|
||||||
for c in instr:
|
for c in instr:
|
||||||
print(f"'{c}',", end='')
|
print(f"'{c}',", end='')
|
||||||
|
print('')
|
||||||
|
print('')
|
||||||
|
print('## Unicode ##')
|
||||||
|
print(f"size: {count*2} bytes")
|
||||||
|
for c in instr:
|
||||||
|
print(f"'{c}',\t0x00U,")
|
||||||
count += 1
|
count += 1
|
||||||
print('')
|
|
||||||
print(f"size: {count}")
|
|
||||||
print('')
|
|
||||||
Reference in New Issue
Block a user