changing variable to int hopefully resolves build errors on all systems.

Committing inlretro.exe for windows users to run latest command line
args.
This commit is contained in:
Paul XPS 2019-01-29 12:33:54 -06:00
parent 63f2c1b358
commit 8d88925cb6
3 changed files with 35 additions and 6 deletions

View File

@ -100,6 +100,7 @@ bricked your device, etc.
1) GET THE SOFTWARE
On Windows:
Go to the st.com link below. At the bottom there's a "GET SOFTWARE"
section, download the STSW-STM32080 item. This is written for v3.0.6
https://www.st.com/en/development-tools/stsw-stm32080.html
@ -108,6 +109,13 @@ Alternatively you can save the hassle of creating an STmicro account
by downloading directly from the following link if you would like:
https://www.dropbox.com/s/gwcvd3dqwkbzsv9/en.stsw-stm32080.zip?dl=0
On Linux:
The dfusedemo is windows only, there is a linux alternative called
dfu-util this may work for mac too. Read through the following
instructions to understand the basic steps. Then
See the "Linux dfu-util" instructions at the end.
2) INSTALL THE SOFTWARE
@ -262,6 +270,28 @@ in DFU mode, try this step again..
LINUX DFU-UTIL STEPS:
sudo apt-get dfu-util
Put device into dfu mode as explained in step 4 above
verify you can see the device
dfu-util -l
get the "alt" with name of @Internal Flash use that number in the -a for example:
Found DFU: [0483:df11] ver=2200, devnum=18, cfg=1, intf=0, path="1-1", alt=1, name="@Option Bytes /0x1FFFF800/01*016 e", serial="FFFFFFFEFFFF"
Found DFU: [0483:df11] ver=2200, devnum=18, cfg=1, intf=0, path="1-1", alt=0, name="@Internal Flash /0x08000000/064*0002Kg", serial="FFFFFFFEFFFF"
(navigate to the firmware/DFU_release directory)
Upgrade Command example:
sudo dfu-util -d 0483:* -a 0 -D INLretro6_PCBv2_0_FWv2_03_01.dfu
----------------------------------------------------------
AVR based devices versions "KAZZO" V1.4 and eariler
----------------------------------------------------------
@ -467,7 +497,6 @@ make clean still deletes lua object files, so this process must be reperformed i
AVR FIRMWARE:
Download and Install WinAVR
http://www.webring.org/l/rd?ring=avr;id=59;url=http%3A%2F%2Fwinavr%2Esourceforge%2Enet%2Findex%2Ehtml
optional: install programmer's notepad has handy feature to make clean, all, program in tools menu
this is nifty if you are scared of the command prompt for some strange reason...
installation process should modify PATH environment variables for you.

Binary file not shown.

View File

@ -67,11 +67,11 @@ libusb_device_handle *open_usb_device( libusb_context *context, int log_level )
// return value is number of devices plus one as list is null terminated, or LIBUSB_ERROR if negative.
// Must free device list after done with it
if (log_level>0) printf("Getting USB device list\n");
ssize_t dev_count = libusb_get_device_list( context, &device_list);
int dev_count = libusb_get_device_list( context, &device_list);
check( dev_count >= 0, "libusb unable to find any devices: %s", libusb_strerror(dev_count));
if (log_level>0) printf("Successfully retrieved USB device list\n");
ssize_t i = 0;
int i = 0;
libusb_device *retroprog = NULL;
libusb_device *device = NULL;
@ -90,12 +90,12 @@ libusb_device_handle *open_usb_device( libusb_context *context, int log_level )
const char *rprog_prod = "INL Retro-Prog";
uint16_t min_fw_ver = 0x200;
if (log_level>0) printf("Searching %ld total devices\n", dev_count-1);
if (log_level>0) printf("Searching %d total devices\n", dev_count-1);
for( i=0; i<dev_count; i++) {
device = device_list[i];
if (log_level>0) printf("getting dev desc #%zd ", i);
if (log_level>0) printf("getting dev desc #%d ", i);
rv = libusb_get_device_descriptor( device, &desc);
check( rv == LIBUSB_SUCCESS, "Unable to get device #%zd descriptor: %s", i, libusb_strerror(rv));
check( rv == LIBUSB_SUCCESS, "Unable to get device #%d descriptor: %s", i, libusb_strerror(rv));
if (log_level>0) printf("checking %x vendor ", desc.idVendor);
if (log_level>0) printf("checking %x product\n", desc.idProduct);