If I get a different ARM development environment (say Rowley CrossWorks) how would I set it up for uploading to the Maple board? I'm a newbie so if you point me in the right direction that works too :)
How to use the Maple board with other IDEs
(19 posts) (5 voices)-
Posted 5 years ago #
-
Hi ianmga!
You will need to configure your toolchain to generate .bin program files for the STM32 used in the maple (STM32F103RB). You can then upload these over USB using the DFU bootloader we have written (probably using "perpetual bootloader mode"), or via the hardware serial bootloader (you will need a serial device and the stm32loader.py script), or using JTAG (you will need extra hardware; see http://leaflabs.com/docs/maple/jtag/).
These directions for the UNIX toolchain might also be helpful, they describe using the Code::Blocks IDE with the GNU compiler toolchain:
http://leaflabs.com/docs/libmaple/unix-toolchain/This bootloader page is also good background, though it is not very clearly written:
http://leaflabs.com/docs/maple-bootloader/This probably isn't enough information for you to actual upload a program but it should give you a feel for the options. What are your motivations for using a different IDE? Do you care about using the libmaple libraries? Do you have access to a serial device (FTDI chip, a computer serial port, an extra arduino or maple)?
Posted 5 years ago # -
I use Visual Studio (Express or Pro) from MS and simple batch file to make/upload to Maple. If i need debug for complex soft - i use IAR or Keil with DIY J-Link adapter via SWD link and SWO for debugg messages.
Posted 5 years ago # -
great! How is the kiel/IAR environments for debugging? I always use gdb, which does the job, although perhaps not well.
You were able to adapt your j-link into maple then?
Posted 5 years ago # -
IAR perfect - i use SWO for printf debug message w/o additional interfaces.
i adapt J-Link for maple JTAG connector so both JTAG/SWD available.http://akb77.com/g/files/media/j-link.jpg
http://akb77.com/g/files/media/iar.jpgPosted 5 years ago # -
awesome. What sort of stm32 board is that? some interesting changes there.
Posted 5 years ago # -
It's base on maple with some changes for me.
Add 32 kHz (optional), boot0, boot1 with jumpers, change LDO/Bat.Charger to presents here.
http://akb77.com/g/gps/new-modules/stm32.pngPosted 5 years ago # -
@bnewbold, to be fair for some reason I thought that the test program was not going to run well on the Maple and it ran just fine, so my apparent need has now decreased a lot.
But to answer the question: Part of it because I have seen other IDEs out there that are reeeally nice. Another reason is for interactive debugging. Also other IDEs have simulators which help with debugging as well.
Posted 5 years ago # -
@x893, whoa! How do you do that?
Posted 5 years ago # -
What ? Board or text in forum ?
Posted 5 years ago # -
@x893 Hahaha, no, what do you get VS to compile and run the Maple? What's in the batch files? Thanks
Posted 5 years ago # -
I use this for make bootloader
1. Install CodeSourcery (D:\Tools\CodeSourcery)
2. Install WinAVR (D:\Tools\WinAVR)
place batch file arm.bat to bootloader folder:@SET PATH=D:\Tools\CodeSourcery\bin;D:\Tools\WinAVR\utils\bin;%PATH%
@%*to compile
arm.bat make
or clean
arm.bat make cleanPosted 5 years ago # -
For use libmaple i change
1. build.bat (add python path)
@SET PATH=D:\Tools\CodeSourcery\bin;D:\Tools\WinAVR\utils\bin;%PATH%
@SET PYTHON=D:/Program Files/Python/python.exe
@%*2. reset.py (change COM1 to your port or use parameter)
import win32ui
import win32con
import serialwin32retry = 1
while retry > 0:
try:
retry = 0
port = serialwin32.Serial('COM1', 115200, timeout=10, rtscts=0)
except:
ans = win32ui.MessageBox("The COM port is Busy! Please Verify that it's not used by another application and retry \r\nRetry?", "WARNING!", win32con.MB_YESNO)
if ans == win32con.IDYES:
retry = 1
else:
raise StandardError, 'ERROR opening the COM port.!'if (port is not None):
port.setRTS(0)
port.setDTR(0)
port.setDTR(1)
port.setDTR(0)
port.setRTS(1)
port.setDTR(1)
port.setDTR(0)
port.send("1EAF", 2)
port.close()2. change in Makefile for install section
# Target upload commands
UPLOAD_ram := $(SUPPORT_PATH)/scripts/reset.py
DFU_ram := $(DFU) -a0 -d $(VENDOR_ID):$(PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
UPLOAD_flash := $(PYTHON) $(SUPPORT_PATH)/scripts/reset.py
DFU_flash := $(DFU) -a1 -d $(VENDOR_ID):$(PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
UPLOAD_jtag := $(OPENOCD) -f support/openocd/flash.cfg
DFU_jtag :=# conditionally upload to whatever the last build was
install: INSTALL_TARGET = $(shell cat $(BUILD_PATH)/build-type 2>/dev/null)
install: $(BUILD_PATH)/$(BOARD).bin
@echo Install target: $(INSTALL_TARGET)
$(UPLOAD_$(INSTALL_TARGET))
sleep 2
$(DFU_$(INSTALL_TARGET))after this changes
build.bat make installPosted 5 years ago # -
Correct reset.py
import win32ui
import win32con
import serialwin32port = None
retry = 1
while retry > 0:
try:
retry = 0
port = serialwin32.Serial('COM1', 115200, timeout=10, rtscts=0)
except:
ans = win32ui.MessageBox("The COM port is Busy! Please Verify that it's not used by another application and retry \r\nRetry?", "WARNING!", win32con.MB_YESNO)
if ans == win32con.IDYES:
retry = 1if (port is not None):
port.setRTS(0)
port.setDTR(0)
port.setDTR(1)
port.setDTR(0)
port.setRTS(1)
port.setDTR(1)
port.setDTR(0)
port.send("1EAF", 2)
port.close()Posted 5 years ago # -
be careful with the "COM1" being set statically, there is no gaurantee that it will come up as COM1!
on linux we use a udev rule to statically reassign whatever COM port that comes up as maple to /dev/maple Im not sure of an equivalent trick for windows.Posted 5 years ago #
Reply »
You must log in to post.