Skip to content

Instantly share code, notes, and snippets.

View sidprice's full-sized avatar
💭
So much to learn ... what a cool life!

Sid Price sidprice

💭
So much to learn ... what a cool life!
View GitHub Profile
1. Start Cygwin
2. Ensure that the master branch of the repository is checked out
3. Mount the repository in the Cygwin environment.
a. mount c:/DataRoot/Projects/blackmagic ~/Projects/blackmagic
4. Navigate into the mounted project source
a. cd ~/Projects/blackmagic/src
5. Clean the build
a. make clean
6. Build the native platform
make
@sidprice
sidprice / main.js
Created September 13, 2018 15:38
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
const path = require('path')
const url = require('url')
// Keep a global reference of the window object, if you don't, the window will
platforms/libftdi/gdb_if.c: In function ‘gdb_if_init’:
platforms/libftdi/gdb_if.c:48:2: error: unknown type name ‘WSADATA’; did you mean ‘CADATE’?
WSADATA wsaData;
^~~~~~~
CADATE
platforms/libftdi/gdb_if.c:49:2: error: implicit declaration of function ‘WSAStartup’; did you mean ‘LZStart’? [-Werror=implicit-function-declaration]
WSAStartup(MAKEWORD(2, 2), &wsaData);
^~~~~~~~~~
LZStart
CC platforms/libftdi/gdb_if.c
platforms/libftdi/gdb_if.c:27:16: error: extra tokens at end of #ifndef directive [-Werror]
#ifndef _WIN32 || defined __CYGWIN__
^~
platforms/libftdi/gdb_if.c: In function ‘gdb_if_init’:
platforms/libftdi/gdb_if.c:47:15: error: extra tokens at end of #ifdef directive [-Werror]
#ifdef _WIN32 || defined __CYGWIN__
^~
platforms/libftdi/gdb_if.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-cast-function-type’ [-Werror]
In file included from /usr/include/w32api/winsock2.h:56:0,
from platforms/libftdi/gdb_if.c:33:
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: error: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Werror=cpp]
#warning "fd_set and associated macros have been defined in sys/types. \
^~~~~~~
In file included from platforms/libftdi/gdb_if.c:33:0:
/usr/include/w32api/winsock2.h:995:34: error: conflicting types for ‘select’
WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
^~~~~~
In file included from /usr/include/sys/types.h:68:0,
#define WDBP_BATTERY_INPUT 0 // ADC Channel for battery input
#define WDBP_TARGET_VOLTAGE_INPUT 8 // ADC Chanmel for target voltage
#define WDBP_ADC_BATTERY 0
#define WDBP_ADC_TARGET 1
static uint32_t inputVoltages[2] = { 0 };
static uint8_t adcChannels[2] = { WDBP_BATTERY_INPUT , WDBP_TARGET_VOLTAGE_INPUT };
////////////////////////////////////////////////////////////////////////////////////////////////////
gcc -Wall -Wextra -Werror -Wno-char-subscripts -Wno-cast-function-type -Ic:\libusb\include -Og -g -std=gnu99 -g3 -MD -I. -Iinclude -Iplatfor
ms/common -Iplatforms/stlinkv2 -DLIBFTDI -DSTLINKV2 -DJTAG_HL -I ./target -Wno-cast-function-type -c command.c -o command.o
In file included from command.c:31:0:
include/version.h:1:1: error: expected identifier or '(' before string constant
"#define FIRMWARE_VERSION \"`git describe --always --dirty`\""
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
command.c:41:2: error: unknown type name 'cmd_handler'
cmd_handler handler;
^~~~~~~~~~~
command.c:67:15: error: 'cmd_handler' undeclared here (not in a function); did you mean 'cmd_hard_srst'?
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xmlns:saxon="http://saxon.sf.net//"
schemaVersion="1.3"
xs:schemaLocation="http://www.atmel.com/schemas/pack-device-atmel-extension PACK.DEVICE.ATMEL.EXTENSION.xsd"
xs:noNamespaceSchemaLocation="PACK.xsd">
<vendor>Atmel</vendor>
<url>http://packs.download.atmel.com/</url>
<name>SAMR21_DFP</name>
<description>Atmel SAMR21 Series Device Support</description>
@sidprice
sidprice / linker_errors
Created July 18, 2019 15:32
Output when building libftdi (BMP)
PS C:\DataRoot\Projects\blackmagic\src> make CC=gcc V=1 PROBE_HOST=LIBFTDI
echo " GIT include/version.h"
" GIT include/version.h"
echo #define FIRMWARE_VERSION "v1.6.1-292-g3165d64" > include/version.h
" CC target/adiv5.c"
gcc -Wall -Wextra -Werror -Wno-char-subscripts -Wno-cast-function-type -O2 -std=gnu99 -g3 -MD -I. -Iinclude -Iplatforms/common -Iplatforms/LIBFTDI -DLIBFTDI -DENABLE_DEBUG -Wno-cast-function-type -c target/adiv5.c -o adiv5.o
" CC target/adiv5_jtagdp.c"
gcc -Wall -Wextra -Werror -Wno-char-subscripts -Wno-cast-function-type -O2 -std=gnu99 -g3 -MD -I. -Iinclude -Iplatforms/common -Iplatforms/LIBFTDI -DLIBFTDI -DENABLE_DEBUG -Wno-cast-function-type -c target/adiv5_jtagdp.c -o adiv5_jtagdp.o
" CC target/adiv5_swdp.c"
gcc -Wall -Wextra -Werror -Wno-char-subscripts -Wno-cast-function-type -O2 -std=gnu99 -g3 -MD -I. -Iinclude -Iplatforms/common -Iplatforms/LIBFTDI -DLIBFTDI -DENABLE_DEBUG -Wno-cast-function-type -c target/adiv5_swdp.c -o adiv5_swdp.o
gcc -L -g -obmdebug.exe bmdebug.o bmscan.o bmp-script.o elf-postlink.o guidriver.o minIni.o rs232.o specialfolder.o strlcpy.o decodectf.o parsetsdl.o swotrace.o nuklear.o nuklear_gdip.o noc_file_dialog.o -lm -lgdiplus -lwinusb
guidriver.o: In function `guidriver_init':
C:\DataRoot\Projects\Black-Magic-Probe-Book\source/guidriver.c:101: undefined reference to `__imp_GetStockObject'
swotrace.o: In function `usb_GetDevicePath':
C:\DataRoot\Projects\Black-Magic-Probe-Book\source/swotrace.c:499: undefined reference to `__imp_SetupDiGetClassDevsA'
C:\DataRoot\Projects\Black-Magic-Probe-Book\source/swotrace.c:506: undefined reference to `__imp_SetupDiEnumDeviceInterfaces'
C:\DataRoot\Projects\Black-Magic-Probe-Book\source/swotrace.c:517: undefined reference to `__imp_SetupDiGetDeviceInterfaceDetailA'
C:\DataRoot\Projects\Black-Magic-Probe-Book\source/swotrace.c:527: undefined reference to `__imp_SetupDiGetDeviceInterfaceDetailA'
C:\DataRoot\Projects\Black-Magic-Probe-Book\source/swotrace.c:543: undefined reference t