Blue pill reading Winbond 25Q80 SPI flash

Jimbo13
Sun Feb 11, 2018 5:23 pm
I have tried without success to use the FlashDiagnostics example from this library to test a Winbond 25Q80 SPI flash from a blue pill.
https://github.com/Marzogh/SPIFlash/wiki
It works using an Arduino Pro Mini 3.3v.

Has anybody had any success, or is there a more suitable library for blue pill?


stevestrong
Sun Feb 11, 2018 6:02 pm
In that lib you have to replace ARCH_STM32 with ARDUINO_ARCH_STM32F1.

Jimbo13
Sun Feb 11, 2018 6:11 pm
OK stevestrong, bear with me but where do I replace ARCH_STM32 with ARDUINO_ARCH_STM32F1.
Jim

stevestrong
Sun Feb 11, 2018 6:25 pm
Haven’t you mentioned the FlashDiagnostic example?

zmemw16
Mon Feb 12, 2018 2:20 pm
go to the folder sketchbook/libaries/xyz

grep -n -R ARCH_STM32 *.h *.c

linux command line experts/wizards/mages would use a find/sed command. for me it’s ‘i like boilerplate’ methodology, so where’s the hammer aka joe ?
:roll:
stephen


ahull
Mon Feb 12, 2018 4:58 pm
I’m going to take a crack at doing this in a one liner…

First, as always, always, always, make a copy of your files before you let sed anywhere near them..

then try something like.. (untested)

cd {base folder you want to cause sed related chaos in}
find . -type f -exec sed -i 's/ARCH\_STM32/ARDUINO\_ARCH\_STM32F1/g' {} +


Jimbo13
Tue Feb 13, 2018 10:59 am
OK, so I deduce from the other replies that I should replace every occurrence of ARCH_STM32 with ARDUINO_ARCH_STM32F1 in the SPIFlash folder.
I checked the SRC folder with findstr and found:
C:\Users\j\Documents\Arduino\libraries\SPIFlash\src>findstr "ARCH_STM32" *.*
SPIFlash.cpp:#elif defined (ARDUINO_ARCH_SAMD) || defined(ARCH_STM32)
SPIFlash.h:#ifndef ARCH_STM32
SPIFlash.h: #if defined(ARDUINO_ARCH_STM32) || defined(__STM32F1__) || defined(STM32F1) || defined(STM32F3) || defined(STM32F4) || defined(STM32F0xx)
SPIFlash.h: #define ARCH_STM32
SPIFlash.h:#if defined (ARDUINO_ARCH_SAM) || defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_ESP8266) || defined (SIMBLEE) || defined (ARDUINO_ARCH_ESP32) || defined (BOARD_RTL8195A) || defined(ARCH_STM32)
SPIFlash.h:#elif defined (ARDUINO_ARCH_SAMD) || defined(ARCH_STM32)
SPIFlash.h: #if defined (ARDUINO_ARCH_SAMD) || defined(ARCH_STM32)

stevestrong
Wed Feb 14, 2018 9:40 pm
After a deeper look it seems that the lib should work out of the box as it is, but you have to use the board default SPI pins, Spi1 and PA4 as cs.
So try it again without replacing anything.
And tell us how do you connect the memory to bluepill.

Jimbo13
Thu Feb 15, 2018 3:29 pm
OK
So I downloaded the whole folder again and replaced the old version from:
https://github.com/Marzogh/SPIFlash

I connected the LC W25Q80B memory modules to pins as follows:

Blue Pill LC W25Q80B memory modules
Vcc 3.3 output from BluePill
GND GND GND
HOLD NC HOLD/I03
WP +3.3 WP/I02
CS PA_4/SPI1 NSS CS
MOSI PA_7/SPI1 MOSI MOSI/I00
MISO PA_6/SPI1 MISO MISO/I01
SCK PA_5/SPI1 SCK CLK

(Sorry I have not got the hang of inserting a table yet.)

Image

I also connected to the other SPI1 pins from PB_5 to PA_15, still no good.
I also connected to the SPI2 pins from PB_15 to PB_12, still no good.

Here is the verbose output from build:
Board Properties
name=Generic STM32F103C series
vid.0=0x1EAF
pid.0=0x0004
build.variant=generic_stm32f103c
build.vect=VECT_TAB_ADDR=0x8000000
build.core=maple
build.board=GENERIC_STM32F103C
upload.use_1200bps_touch=false
upload.file_type=bin
upload.auto_reset=true
upload.tool=stlink_upload
upload.protocol=STLink
menu.device_variant.STM32F103C8=STM32F103C8 (20k RAM. 64k Flash)
menu.device_variant.STM32F103C8.build.cpu_flags=-DMCU_STM32F103C8
menu.device_variant.STM32F103C8.build.ldscript=ld/jtag_c8.ld
menu.device_variant.STM32F103C8.upload.maximum_size=65536
menu.device_variant.STM32F103C8.upload.maximum_data_size=20480
menu.device_variant.STM32F103CB=STM32F103CB (20k RAM. 128k Flash)
menu.device_variant.STM32F103CB.build.cpu_flags=-DMCU_STM32F103CB
menu.device_variant.STM32F103CB.build.ldscript=ld/jtag.ld
menu.device_variant.STM32F103CB.upload.maximum_size=131072
menu.device_variant.STM32F103CB.upload.maximum_data_size=20480
menu.upload_method.DFUUploadMethod=STM32duino bootloader
menu.upload_method.DFUUploadMethod.upload.protocol=maple_dfu
menu.upload_method.DFUUploadMethod.upload.tool=maple_upload
menu.upload_method.DFUUploadMethod.build.upload_flags=-DSERIAL_USB -DGENERIC_BOOTLOADER
menu.upload_method.DFUUploadMethod.build.vect=VECT_TAB_ADDR=0x8002000
menu.upload_method.DFUUploadMethod.build.ldscript=ld/bootloader_20.ld
menu.upload_method.DFUUploadMethod.upload.usbID=1EAF:0003
menu.upload_method.DFUUploadMethod.upload.altID=2
menu.upload_method.serialMethod=Serial
menu.upload_method.serialMethod.upload.protocol=maple_serial
menu.upload_method.serialMethod.upload.tool=serial_upload
menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
menu.upload_method.STLinkMethod=STLink
menu.upload_method.STLinkMethod.upload.protocol=STLink
menu.upload_method.STLinkMethod.upload.tool=stlink_upload
menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
menu.upload_method.BMPMethod=BMP (Black Magic Probe)
menu.upload_method.BMPMethod.upload.protocol=gdb_bmp
menu.upload_method.BMPMethod.upload.tool=bmp_upload
menu.upload_method.BMPMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
menu.upload_method.jlinkMethod=JLink
menu.upload_method.jlinkMethod.upload.protocol=jlink
menu.upload_method.jlinkMethod.upload.tool=jlink_upload
menu.upload_method.jlinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
menu.cpu_speed.speed_72mhz=72Mhz (Normal)
menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L
menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB)
menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L
menu.cpu_speed.speed_128mhz=Overclocked 128Mhz NO USB SERIAL. MANUAL RESET NEEDED TO UPLOAD
menu.cpu_speed.speed_128mhz.build.f_cpu=128000000L
menu.opt.osstd=Smallest (default)
menu.opt.osstd.build.flags.optimize=-Os
menu.opt.osstd.build.flags.ldspecs=
menu.opt.oslto=Smallest Code with LTO
menu.opt.oslto.build.flags.optimize=-Os -flto
menu.opt.oslto.build.flags.ldspecs=-flto
menu.opt.o1std=Fast (-O1)
menu.opt.o1std.build.flags.optimize=-O1
menu.opt.o1std.build.flags.ldspecs=
menu.opt.o1lto=Fast (-O1) with LTO
menu.opt.o1lto.build.flags.optimize=-O1 -flto
menu.opt.o1lto.build.flags.ldspecs=-flto
menu.opt.o2std=Faster (-O2)
menu.opt.o2std.build.flags.optimize=-O2
menu.opt.o2std.build.flags.ldspecs=
menu.opt.o2lto=Faster (-O2) with LTO
menu.opt.o2lto.build.flags.optimize=-O2 -flto
menu.opt.o2lto.build.flags.ldspecs=-flto
menu.opt.o3std=Fastest (-O3)
menu.opt.o3std.build.flags.optimize=-O3
menu.opt.o3std.build.flags.ldspecs=
menu.opt.o3lto=Fastest (-O3) with LTO
menu.opt.o3lto.build.flags.optimize=-O3 -flto
menu.opt.ogstd=Debug (-g)
menu.opt.o3lto.build.flags.ldspecs=-flto
menu.opt.ogstd.build.flags.optimize=-Og
menu.opt.ogstd.build.flags.ldspecs=
runtime.ide.path=C:\Program Files (x86)\Arduino
runtime.os=windows
build.system.path=C:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system
runtime.ide.version=10805
target_package=Arduino_STM32
target_platform=STM32F1
runtime.hardware.path=C:\Users\james\Documents\Arduino\hardware\Arduino_STM32
originalid=genericSTM32F103C
debug.tool=gdb
tools.gdb.pre_init.tool=openocd
tools.gdb.cmd=arm-none-eabi-gdb.exe
tools.gdb.path={runtime.tools.arm-none-eabi-gcc.path}/bin
tools.gdb.pattern="{path}/{cmd}" -interpreter=mi -d "{build.project_path}"
tools.gdb.openocd.cmd=bin/openocd.exe
tools.gdb.openocd.path={runtime.vm.ide.platforms.path}/default/tools/openocd-0.9.0
tools.gdb.openocd.params.verbose=-d2
tools.gdb.openocd.params.quiet=-d0
tools.gdb.openocd.pattern="{path}/{cmd}" -s "{path}/scripts/" -f "{path}/scripts/{build.openocdscript}"
version=0.1.2
compiler.warning_flags=-w -DDEBUG_LEVEL=DEBUG_NONE
compiler.warning_flags.none=-w -DDEBUG_LEVEL=DEBUG_NONE
compiler.warning_flags.default=-DDEBUG_LEVEL=DEBUG_NONE
compiler.warning_flags.more=-Wall -DDEBUG_LEVEL=DEBUG_FAULT
compiler.warning_flags.all=-Wall -Wextra -DDEBUG_LEVEL=DEBUG_ALL
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-c -g {build.flags.optimize} {compiler.warning_flags} -std=gnu11 -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin}
compiler.c.elf.cmd=arm-none-eabi-g++
compiler.c.elf.flags={build.flags.optimize} -Wl,--gc-sections {build.flags.ldspecs}
compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-c -g {build.flags.optimize} {compiler.warning_flags} -std=gnu++11 -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin}
compiler.ar.cmd=arm-none-eabi-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2hex.flags=-O binary
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.ldflags={build.flags.ldspecs}
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DARDUINO=
build.f_cpu=72000000L
build.mcu=cortex-m3
build.common_flags=-mthumb -march=armv7-m -D__STM32F1__
build.variant_system_lib=libmaple.a
build.error_led_port=GPIOB
build.error_led_pin=1
build.cpu_flags=-DMCU_STM32F103C8
build.hs_flag=
build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
build.extra_flags={build.upload_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags}
compiler.c.extra_flags=
compiler.c.elf.extra_flags="-L{build.variant.path}/ld"
compiler.cpp.extra_flags=
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.elf2hex.extra_flags=
compiler.libs.c.flags="-I{build.system.path}/libmaple" "-I{build.system.path}/libmaple/include" "-I{build.system.path}/libmaple/stm32f1/include" "-I{build.system.path}/libmaple/usb/stm32f1" "-I{build.system.path}/libmaple/usb/usb_lib"
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} "{build.path}/{archive_file}" -Wl,--end-group
recipe.objcopy.eep.pattern=
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.rodata|\.text.align|\.ARM.exidx)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
recipe.output.tmp_file={build.project_name}.bin
recipe.output.save_file={build.project_name}.{build.variant}.bin
tools.maple_upload.cmd=maple_upload.bat
tools.maple_upload.cmd.windows=maple_upload.bat
tools.maple_upload.path={runtime.hardware.path}/tools/win
tools.maple_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.maple_upload.path.linux={runtime.hardware.path}/tools/linux
tools.maple_upload.path.linux64={runtime.hardware.path}/tools/linux64
tools.maple_upload.upload.params.verbose=-d
tools.maple_upload.upload.params.quiet=
tools.maple_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
tools.serial_upload.cmd=serial_upload.bat
tools.serial_upload.cmd.windows=serial_upload.bat
tools.serial_upload.cmd.macosx=serial_upload
tools.serial_upload.path={runtime.hardware.path}/tools/win
tools.serial_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.serial_upload.path.linux={runtime.hardware.path}/tools/linux
tools.serial_upload.path.linux64={runtime.hardware.path}/tools/linux64
tools.serial_upload.upload.params.verbose=-d
tools.serial_upload.upload.params.quiet=n
tools.serial_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
tools.stlink_upload.cmd=stlink_upload.bat
tools.stlink_upload.cmd.windows=stlink_upload.bat
tools.stlink_upload.path.windows={runtime.hardware.path}/tools/win
tools.stlink_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.stlink_upload.path.linux={runtime.hardware.path}/tools/linux
tools.stlink_upload.path.linux64={runtime.hardware.path}/tools/linux64
tools.stlink_upload.upload.params.verbose=-d
tools.stlink_upload.upload.params.quiet=
tools.stlink_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
tools.bmp_upload.cmd=arm-none-eabi-gdb
tools.bmp_upload.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
tools.bmp_upload.upload.speed=230400
tools.bmp_upload.upload.params.verbose=
tools.bmp_upload.upload.params.quiet=-q --batch-silent
tools.bmp_upload.upload.pattern="{path}{cmd}" -cd "{build.path}" -b {upload.speed} {upload.verbose} -ex "set debug remote 0" -ex "set target-async off" -ex "set remotetimeout 60" -ex "set mem inaccessible-by-default off" -ex "set confirm off" -ex "set height 0" -ex "target extended-remote {serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "x/wx 0x8000004" -ex "monitor erase_mass" -ex "echo 0x8000004 expect 0xffffffff after erase\n" -ex "x/wx 0x8000004" -ex "file {build.project_name}.elf" -ex "load" -ex "x/wx 0x08000004" -ex "tbreak main" -ex "run" -ex "echo \n\n\nUpload finished!" -ex "quit"
tools.jlink_upload.cmd=jlink_upload.bat
tools.jlink_upload.cmd.windows=jlink_upload.bat
tools.jlink_upload.cmd.macosx=jlink_upload
tools.jlink_upload.path={runtime.hardware.path}/tools/win
tools.jlink_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.jlink_upload.path.linux={runtime.hardware.path}/tools/linux
tools.jlink_upload.path.linux64={runtime.hardware.path}/tools/linux64
tools.jlink_upload.upload.params.verbose=-d
tools.jlink_upload.upload.params.quiet=n
tools.jlink_upload.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin"
tools.stlink_upload.path={runtime.hardware.path}/tools/win
vm.platform.root.path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\w5ajpyzy.xkh\Micro Platforms\arduino16x
runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr
runtime.tools.arduinoOTA-1.1.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr
runtime.tools.arm-none-eabi-gcc.path=C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1
runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path=C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1
runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr
runtime.tools.avrdude-6.3.0-arduino9.path=C:\Program Files (x86)\Arduino\hardware\tools\avr
runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr
runtime.tools.avr-gcc-4.9.2-atmel3.5.4-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr
runtime.tools.bossac.path=C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\bossac\1.6.1-arduino
runtime.tools.bossac-1.6.1-arduino.path=C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\bossac\1.6.1-arduino
runtime.tools.tools-avr.path=C:\Program Files (x86)\Arduino\hardware\tools\avr
runtime.vm.boardinfo.id=Arduino_STM32_genericSTM32F103C
runtime.vm.boardinfo.name=Arduino_STM32_genericSTM32F103C
runtime.vm.boardinfo.desc=Generic STM32F103C series
runtime.vm.boardinfo.src_location=C:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1
ide.hint=Use installed IDE. Provides built-in hardware, reference/help and libraries.
ide.location.key=Arduino16x
ide.location.ide.winreg=Arduino 1.6.x Application
ide.location.sketchbook.winreg=Arduino 1.6.x Sketchbook
ide.location.sketchbook.preferences=sketchbook.path
ide.default.revision_name=1.9.0
ide.default.version=10800
ide.default.package=arduino
ide.default.platform=avr
ide.multiplatform=true
ide.includes=Arduino.h
ide.exe_name=arduino
ide.platformswithoutpackage=false
ide.includes.fallback=wprogram.h
ide.extension=ino
ide.extension.fallback=pde
ide.versionGTEQ=160
ide.exe=arduino.exe
ide.builder.exe=arduinobuilder.exe
ide.builder.name=Arduino Builder
ide.hosts=atmel
ide.url=http://arduino.cc/en/Main/Software
ide.help.reference.path=reference
ide.help.reference.path2=reference\www.arduino.cc\en\Reference
ide.help.reference.serial=reference\www.arduino.cc\en\Serial
ide.location.preferences.portable={runtime.ide.path}\portable
ide.location.preferences.arduinoData={runtime.sketchbook.path}\ArduinoData
ide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt
ide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino15\preferences.txt
ide.location.contributions=%VM_APPDATA_LOCAL%\arduino15
ide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15
ide.contributions.boards.allow=true
ide.contributions.boards.ignore_unless_rewrite_found=true
ide.contributions.libraries.allow=true
ide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls
ide.create_platforms_from_boardsTXT.teensy=build.core
vm.debug=true
software=ARDUINO
ssh.user.name=root
ssh.user.default.password=arduino
ssh.host.wwwfiles.path=/www/sd
build.working_directory={runtime.ide.path}\java\bin
ide.appid=arduino16x
location.sketchbook=C:\Users\james\Documents\Arduino
build.core.path=C:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple
vm.core.include=arduino.h
vm.boardsource.path=C:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1
runtime.platform.path=C:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1
vm.platformname.name=STM32F1
build.arch=STM32F1
build.ldscript=ld/jtag_c8.ld
upload.maximum_size=65536
upload.maximum_data_size=20480
build.flags.optimize=-Os
build.flags.ldspecs=
builder.noino=false
intellisense.include.paths={runtime.hardware.path}
build.architecture=4.8.3-2014q1
vmresolved.compiler.path=C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin\
vmresolved.tools.path=C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1
build.path=C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug
build.project_name=FlashDiagnostics.ino
build.project_path=C:\Users\james\Documents\Arduino\libraries\SPIFlash\examples\FlashDiagnostics
ProjectDir=C:\Users\james\Documents\Arduino\libraries\SPIFlash\examples\FlashDiagnostics\
vm.runtime.compiler.showwarnings=true
vm.runtime.upload.verbose=false
vm.runtime.upload.verify=false
serial.port.file=COM3
serial.port=COM3
serial.port.num=3
extra.time.local=1518701351
extra.time.utc=1518701351
extra.time.dst=0
extra.time.zone=0
serial.port.caption=COM3 - USB Serial Device
serial.Caption=USB Serial Device (COM3)
serial.ClassGuid={4d36e978-e325-11ce-bfc1-08002be10318}
serial.CompatibleID.value0=USB\Class_02
serial.ConfigManagerErrorCode=0
serial.ConfigManagerUserConfig=False
serial.CreationClassName=Win32_PnPEntity
serial.Description=USB Serial Device
serial.DeviceID=USB\VID_1EAF&PID_0004\5&1793F98&0&5
serial.HardwareID.value0=USB\VID_1EAF&PID_0004
serial.Manufacturer=Microsoft
serial.Name=USB Serial Device (COM3)
serial.PNPClass=Ports
serial.PNPDeviceID=USB\VID_1EAF&PID_0004\5&1793F98&0&5
serial.Present=True
serial.Service=usbser
serial.Status=OK
serial.SystemCreationClassName=Win32_ComputerSystem
serial.SystemName=DESKTOP-GIK8J7O
serial.vid=0x1EAF
serial.pid=0x0004
serial.iserial=5&1793F98&0&5
serial.port.iserial=5&1793F98&0&5
vm.runtime.compiler.auto_discover_includes=true
vm.runtime.compiler.auto_discover_includes_cache=true
build.vm.build.vmdebug=0
build.vm.build.isgdb=0
build.vm.build.optimised=1
vm.last.buildpath=C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug

Compiling 'FlashDiagnostics' for 'Generic STM32F103C series'
Build Folder: file:///C:/Users/james/AppData/Local/Temp/VMBuilds/FlashDiagnostics/Arduino_STM32_genericSTM32F103C/Debug
Summary: Header=1 Prototypes=27 Imports=0
Additional Defines:
Architecture Tools: file:///C:/Users/james/AppData/Local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/
Api: 1.1801.27-0
Sketch Book: file:///C:/Users/james/Documents/Arduino
Sketch Include Paths
Core Include Paths
Include Path file:///C:/Users/james/Documents/Arduino/hardware/Arduino_STM32/STM32F1/cores/maple
Include Path file:///C:/Users/james/Documents/Arduino/hardware/Arduino_STM32/STM32F1/variants/generic_stm32f103c
Searching for libraries ...
Using previous search results: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\FlashDiagnostics.cpp
Using previous search results: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\FlashDiagnostics.cpp
Using previous search results: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\FlashDiagnostics.cpp
Using previous search results: C:\Users\james\Documents\Arduino\libraries\SPIFlash\src\FLASHIO.cpp
Using previous search results: C:\Users\james\Documents\Arduino\libraries\SPIFlash\src\SAM_DMASPI.cpp
Using previous search results: C:\Users\james\Documents\Arduino\libraries\SPIFlash\src\SPIFlash.cpp
Using previous search results: C:\Users\james\Documents\Arduino\libraries\SPIFlash\src\troubleshoot.cpp
Using previous search results: C:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src\SPI.cpp

Building variant ...

Using previously compiled variant

Building core ...

Building libraries ...

Using library SPI version 1.0 in folder file:///C:/Users/james/Documents/Arduino/hardware/Arduino_STM32/STM32F1/libraries/SPI
Using previously compiled file: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPI\SPI.cpp.o

Using library SPIFlash version 3.0.1 in folder file:///C:/Users/james/Documents/Arduino/libraries/SPIFlash
Using previously compiled file: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\FLASHIO.cpp.o
Using previously compiled file: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\SAM_DMASPI.cpp.o
Using previously compiled file: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\SPIFlash.cpp.o
Using previously compiled file: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\troubleshoot.cpp.o

Building project code ...
Using previously compiled file: C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\FlashDiagnostics.cpp.o

Linking it all together ...
"C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -Os -Wl,--gc-sections -mcpu=cortex-m3 "-TC:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld/jtag_c8.ld" "-Wl,-Map,C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug/FlashDiagnostics.ino.map" "-LC:\Users\james\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c/ld" -o "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug/FlashDiagnostics.ino.elf" "-LC:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\FlashDiagnostics.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\FLASHIO.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\SAM_DMASPI.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\SPIFlash.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPIFlash\troubleshoot.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\SPI\SPI.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\variant\board.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\variant\boards.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\variant\boards_setup.cpp.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\variant\start.S.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\variant\start_c.c.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug\variant\syscalls.c.o" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug/core.a" -Wl,--end-group

SPIFlash.cpp.o*: In function SPIFlash::begin(unsigned long)
SPIFlash.cpp: 104: warning: undefined reference to `SPIFlash::setClock(unsigned long)
## recipe.objcopy.hex.pattern
"C:\Users\james\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug/FlashDiagnostics.ino.elf" "C:\Users\james\AppData\Local\Temp\VMBuilds\FlashDiagnostics\Arduino_STM32_genericSTM32F103C\Debug/FlashDiagnostics.ino.bin"

Program FlashDiagnostics size: 50,016 bytes (used 76% of a 65,536 byte maximum) (0.43 secs)
Minimum Memory Usage: 4296 bytes (21% of a 20480 byte maximum)


zmemw16
Thu Feb 15, 2018 4:09 pm
silly i know, but do those power rails have a gap in continuity at the middle tab position ?
that’s caught me once, now i just assume it’s gapped and insert links across anyway. :)

did you rebuild on a different breadboard or just swap mcu and move some wires ?

stephen


Jimbo13
Thu Feb 15, 2018 4:40 pm
Yes the gap caught me out before but that doesnt seem to be the case here but the jumper leads are very loose in the breadboard so I replaced all and checked voltage at memory board.
I didnt try another Blue Pill or memory module yet but I was able to read this one OK on an Arduino mini 3.3 v, I will try swapping both later.

Jim

PS it seems to read something on the memory chip as I get back: JEDEC ID: ef4014h


Jimbo13
Thu Feb 15, 2018 7:56 pm
OK so I swapped the mcu and it still wont play.
I am expecting another flash memory in the post, when it arrives I can swap that as well.

Jim


stevestrong
Fri Feb 16, 2018 8:06 am
Do you really need a library?
Can’t you simply write some very simple functions, like here: http://stm32duino.com/viewtopic.php?f=9&t=2412?

Jimbo13
Fri Feb 16, 2018 8:28 am
OK stevestrong, you are correct, I probably don’t need a sophisticated library and I had intended to write my own code when I discovered a library and so thought this would save me some development time and was distracted to go down that route.
I will step back and take your suggestion and look at what I require and try and develop my own functions.
This might also be quicker than trying to get a library, which I have to decipher to understand, to work.

Jim


Leave a Reply

Your email address will not be published. Required fields are marked *