GithubHelp home page GithubHelp logo

arduino_tools's People

Contributors

abostm avatar chrissbarr avatar fpistm avatar grantm11235 avatar he1my avatar inouetaichi avatar jgillick avatar kbumsik avatar rogerclarkmelbourne avatar serasidis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino_tools's Issues

STM32_Programmer.sh not found

STM32_Programmer.sh is in /usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin and this folder is added to the path. I can run STM32_Programmer.sh in the terminal with no issues.

However, Arduino IDE complains that STM32_Programmer.sh was not found.

When I checked, the PATH inside stm32CubeProg.sh was different from the one in the terminal.

I even changed $HOME to /usr/local in stm32CubeProg.sh but the error is still the same.

In latest ArduinoIDE 1.8.19, `stm32CubeProg.sh` claims `STM32_Programmer.sh` is not on my `PATH`.

STM32_Programmer.sh is added to my PATH in ~/.bashrc. It works fine in the Arduino Extension in VSCode, and I can execute the logic (command -v STM32_Programmer.sh) manually in a terminal application.

~/.bashrc

export PATH="/opt/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/:${PATH}"

In terminal:

$ command -v STM32_Programmer.sh
/opt/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer.sh

Maybe the logic needs to be revisited for the latest Arduino IDE? 🤷

What is the meaning of ADCSD in the PeripherialPins.c

Hello,

in the PinMap_ADC are several lines like:
//{PB_0, ADCSD1,STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, A6P, 0)}, // SDADC1_AIN6P

What is the meaining of this?

I first thought those lines belong to the SDADC, for example in the STM32F373. But uncomment a line leads to errors. First ADCSD1 seem nowhere to be defined. Changing this to SDADC1 throws an error about A6P is not defined.

In which case are these lines to be used?

Thanks.

Mass Storage upload "NODE not found error"

If i connect my nucleo to the pc i see the nuvleo recognized as mass storage device.
If i try to program it, i get the error:

An error occurred while uploading the sketch
NODE_F303RE not found. Please ensure the device is correctly connected

I believe that is caused by the fact that the device is seen (lsusb) but does not get automatically mounted (default in kde 5, but for what i find around seems more a systemd stuff)

a quick fix is to ask the user to check if the drive is mounted (it is done once the user try to open it)

a proper fix would be to check if the disk is mounted, and if not it can be mounted/unmounted with 'udisksctl for example: 'udisksctl mount -b /dev/sde /tmp/nucleo

[STM32CubeProg] Add an offset for upload?

Hello

I'm using the STM32CubeProgrammer to upload, and I just had the use of an address offset, to upload code via Arduino without overwriting my custom bootloader.

I modified the upload script for my purposes, but it may be useful to add it properly as a feature/option? (and I wouldn't need to modify everything again after updates :P )

I added this to the upload script:

case $1 in
    -o|--offset)
    OFFSET=$2
    ADDRESS=$((ADDRESS+OFFSET))
    shift # past argument
    shift # past value
    ;;
esac

And to the boards.txt file:

GenF3.menu.pnum.MY_BOARD.upload.extra_options=-o 0x2800
...
GenF3.menu.upload_method.swdMethod.upload.options={upload.extra_options} -g

I'm no expert in scripts or Arduino's board definitions syntax, maybe there's a better way?
I can add a pull request if desired and if the way I did it seems suited. What do you think?

Cheers,
Benjamin

MacOS Catalina PORT='USB1' -> PORT='usb1'

Hello. I am trying to incorporate the Adafruit Feather STM32F405 Express into the design of a dev kit that I'm building. Out-of-the-box Arduino support is critical.

I followed install instructions, and on MacOS the stm32duino scripts fail when trying to program the board. Here is the support history on the Adafruit site, fyi:

I reduced the problem down to the fact that, for some reason, the script in macosx/stm32CubeProg (which is called macosx/stm32CubeProg.sh in this repo) has a problem. (I do not understand why it has a .sh extension in this repo but it has no extension in the version packaged with stm32duino.)

As you can see in the above forum post, I ultimately found that the 'fix' was to change PORT='USB1' to PORT='usb1' in the macosx script.

I would deeply appreciate your fixing and deploying this asap because it'll be difficult to get users to find and edit this file themselves, and the failure mode will be somewhat mysterious to them. Thank you.

STM32F030C8 pinmap is missinf PF6 and PF7 as I2C pins

Hi,

The generated pinmap for the STM32F030C8 chip has only PB pins as available for I2C. In the STM32CubeMX software I can select pins 35 and 36 (PF6 and PF7) as SCL and SDA for the I2C2 module.

The generated code for the GPIO init is:
__HAL_RCC_GPIOF_CLK_ENABLE();
/**I2C2 GPIO Configuration
PF6 ------> I2C2_SCL
PF7 ------> I2C2_SDA
*/
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);

/* I2C2 clock enable */
__HAL_RCC_I2C2_CLK_ENABLE();

It is a bit odd, because there is no GPIO_InitStruct.Alternate. There is also no mention for PF6 and PF7 in the datasheet :-(.

2.2.0/linux/hid-flash binary on Linux does not have execute bit set

Hi,
I just upgraded to STM32duino 2.5.0, and I encountered the same problem as bug #79 that I filed 1.5 years ago: various binaries under the STMicroelectronics/tools/STM32Tools/2.2.0/linux do not have their eXecute bit set, in particular, the hid-flash. This causes the Arduino IDE to fail with a Java exception, preventing flashing of my STM32 Blue Pill using the HID bootloader.

$ cd .../STMicroelectronics/tools/STM32Tools/2.2.0/linux
$ ls -l 
-rw-r--r-- 1 brian brian   411 Mar 28 15:00 45-maple.rules
drwxr-xr-x 2 brian brian  4096 Mar 28 15:00 dfu-util/
drwxr-xr-x 2 brian brian  4096 Mar 28 15:00 dfu-util_x86_64/
-rw-r--r-- 1 brian brian 42728 Mar 28 15:00 hid-flash
-rwxr-xr-x 1 brian brian   596 Mar 28 15:00 install.sh*
-rwxr-xr-x 1 brian brian  2414 Mar 28 15:00 massStorageCopy.sh*
-rw-r--r-- 1 brian brian  7946 Mar 28 15:00 upload_reset

$ ls -l dfu-util
-rw-r--r-- 1 brian brian  31663 Mar 28 15:00 dfu-prefix
-rw-r--r-- 1 brian brian  31962 Mar 28 15:00 dfu-suffix
-rw-r--r-- 1 brian brian 115520 Mar 28 15:00 dfu-util

$ ls -l dfu-util_x86_64/
-rw-r--r-- 1 brian brian  47032 Mar 28 15:00 dfu-prefix
-rw-r--r-- 1 brian brian  47088 Mar 28 15:00 dfu-suffix
-rw-r--r-- 1 brian brian 151688 Mar 28 15:00 dfu-util

The workaround is to manually set this bit:

$ chmod +x hid-flash upload_reset dfu-util/* dfu-util_x86_64/*

The Java exception is:

/home/brian/Downloads/arduino/ArduinoIDE/arduino-1.8.19/portable/packages/STMicroelectronics/tools/STM32Tools/2.2.0/linux/hid-flash /tmp/arduino_build_427209/AutoBenchmark.ino.bin ttyACM0 
java.io.IOException: Cannot run program "/home/brian/Downloads/arduino/ArduinoIDE/arduino-1.8.19/portable/packages/STMicroelectronics/tools/STM32Tools/2.2.0/linux/hid-flash": error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:485)
	at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11)
	at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
	at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:197)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
	at processing.app.SketchController.upload(SketchController.java:732)
	at processing.app.SketchController.exportApplet(SketchController.java:703)
	at processing.app.Editor$UploadHandler.run(Editor.java:2081)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 11 more
An error occurred while uploading the sketch

upload-reset timeout for particular sketch in linux

Hi,

When an uploaded sketch contains a while loop waiting for serial usb to connect such as:

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
}

the stm32duino bootloader does not work anymore. I've isolated the problem to upload-reset which produces the following error:

freynder@desktop:~/$ ./upload-reset /dev/ttyACM0
setDTR: TIOCMSET: Connection timed out
setDTR: TIOCMSET: Protocol error
setRTS(): TIOCMSET: Protocol error
setDTR: TIOCMSET: Protocol error
setDTR: TIOCMSET: Protocol error

OS is Ubuntu 18.04. Board: blue pill.

When I upload a new sketch (using serial upload) without the while loop, the stm32duino bootloader functions as normal again for subsequent uploads.

Windows: EXCEPTION_ACCESS_VIOLATION on recent JRE on Windows 10

My colleague had issues with maple_loader.jar crashing out as per the JRE crash log snippet below but it looks like the root cause is due to an old version of JSSC. Replacing the bundled JSSC .jar file in Arduino_Tools to the 2.9.2 from upstream release sorted out the problem. Could the bundled JSSC .jar in Arduino_Tools be updated to the latest from upstream? Thanks!

Reference to JSSC issue: java-native/jssc#65

Current thread (0x000001e363cc8000):  JavaThread "main" [_thread_in_native, id=8604, stack(0x0000000f57000000,0x0000000f57100000)]

Stack: [0x0000000f57000000,0x0000000f57100000],  sp=0x0000000f570fed00,  free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [jSSC-2.8_x86_64.dll+0xb5db]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jssc.SerialNativeInterface.openPort(Ljava/lang/String;Z)J+0
j  jssc.SerialPort.openPort()Z+65
j  processing.app.Serial.<init>(Ljava/lang/String;ICIF)V+101
j  processing.app.Serial.<init>()V+40
j  CliTemplate.DFUUploader.emitResetPulse()V+10
j  CliTemplate.DFUUploader.uploadViaDFU(Ljava/lang/String;)Z+70
j  CliTemplate.CliMain.main([Ljava/lang/String;)V+104
v  ~StubRoutines::call_stub

siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x0000000061cb1bf3

[Windows] remove maple_loader.jar usage

This problem occurs when a second (different) Java version is installed on a windows PC (besides the one provided with the Arduino IDE). Instead of using the provided Java version of the Arduino IDE the maple_upload.bat-file uses the Java version found in the environment path (oftentimes this is a different one).

This results in the following error message:

maple_loader v0.1
Resetting to bootloader via DTR pulse
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=12684, tid=0x0000000000003214
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [jSSC-2.8_x86_64.dll+0xb5db]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Daniel\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\1.4.0\tools\win\hs_err_pid12684.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

To solve this problem the following line should be added to the maple_upload.bat:
if exist "C:\Program Files (x86)\Arduino\java\bin" set PATH=C:\Program Files (x86)\Arduino\java\bin;%PATH%

This line temporarily changes the PATH during the execution of this batch file and ensures that the correct Java version is used.

This issue also has been discussed here.

cp a bin fails on Catalina

Hi,

Realised when uploading from Arduino IDE on Mac OS X (10.15 Catalina), using MassSotrage method, it fails, saying that the .ino.bin is a directory.
Adding a -r to the cp command in tools/macosx/massStorageCopy.sh solved the issue, but I'm not sure it's the best way to do this.

Cheers

No programmer present in Linux (linux lite (ubuntu))

I recently switched over to linux. I installed arduino then installed stm32duino core. I could compile fine but the ide could not find the tool to download the bin file.

I posted on the arduino forum to see if anyone else had this problem but I got no responses.
The stm32duino forum is no longer available so I searched the web for answers. I did not find anything that helped.

I ended up finding the script (stm32CubeProg.sh.) that the arduino ide calls to download the bin files.

This script looks for STM32_Programmer.sh if it doesn't find it in your path it looks for it in $HOME/programs/STM32CubeProgrammer/bin.
If it doesn't find it an error msg is displayed to the user.

To get the arduino ide to program my st board I had to download the cube programmer (CLI version) and install it so that arduino ide could find it. BTW- there is a bug in the STM32Cube programmer stand alone version such that is will not come up on my linux machine. It is well known on the ST forums.

I have read and re-read the readme files to see if I had missed something during install but since I used the ide to install the core everything would of been taken care of correctly. I did not find any documentation to advise downloading the programming tool as part of the core install.

I do not remember having to go through this when using windows 10. I am now using Linux.

how to pass ST-Link serial number to stm32programmer ?

Hello,
When several NUCLEO boards are connected, how can I specify to stm32programmer the expected serial number to flash with ?
In other words, STM32Programmer CLI can receive a "sn" option that specifies the serial number, but I don't find any placeholder in boards.txt to send it to.

Mass storage upload fails on linux64 when no 32-bit loader is installed

On a 64-bit Ubuntu Disco system, mass-storage uploads fail. In the IDE window, I get:

java.io.IOException: Cannot run program "/home/matthijs/.arduino15/packages/STM32/tools/STM32Tools/1.3.1/tools/linux/massStorageCopy": error=2, No such file or directory

Closer inspection shows that the file referenced actually does exist, but is a 32-bit binary. Executing it fails with a ENOENT, which is expected (according to https://unix.stackexchange.com/a/13409/233460) when no 32-bit loader is installed.

Manually starting the binary also fails, and strace shows it is the actual execve systemcall that fails:

execve("/home/matthijs/.arduino15/packages/STM32/tools/STM32Tools/1.3.1/tools/linux/massStorageCopy", ["/home/matthijs/.arduino15/packages/STM32/tools/STM32Tools/1.3.1/tools/linux/massStorageCopy"], 0x7ffe812fecd8 /* 95 vars */) = -1 ENOENT (No such file or directory)

A linux64 version is included, which does run and work as expected (tested by editing platform.txt).

Looking at the platform.txt, at first glance it looks like there is a typo in the linux64 version: https://github.com/stm32duino/Arduino_Core_STM32/blob/6808f06a3c183f22784f0486a3034644535c5b2b/platform.txt#L160-L161

As you can see, both refer to the 32-bit version. However, on closer inspection, it turns out that the Arduino IDE does not actually distinguish between linux32 and linux64 currently, so to really fix this, I guess the IDE needs to be changed (I'll file a bug report for that as well).

As a workaround, you can enable execution of 32-bit binaries on a 64-bit Linux Debian-derived (e.g. Ubuntu) system by enabling multiarch and installing a 32-bit libc:

dpkg --add-architecture i386
apt-get update
apt-get install libc6:i386

With that, things work as expected again. But ideally, you would use the 64-bit version on a 64-bit system, if Arduino adds support for that.

To Reproduce

  1. Get a 64-bit system without 32-bit compatibility enabled (default on Ubuntu, it seems).
  2. Get any sketch, and select any STM32 board (e.g. Nucleo63 -> F401RE)
  3. Select upload method mass storage
  4. Press upload

Desktop (please complete the following information):

  • OS: Linux Ubuntu Disco
  • Arduino IDE version: Git master (a1448876a1115c9d3ee9e88f29a15bb081a27816), bit newer than 1.8.11
  • STM32 core version: 1.7.0
  • Upload method: Mass Storage

Board (please complete the following information):

  • Name: Nucleo F401RE

License missing

This repository is missing a license file, please add one.

Flashing with Arduino MCU

I think this is quite possible? Create such a sketch for arduino-compatible microcontrollers, with which you can flash any STM32 via UART? Or maybe there is a ready-made one?

2.1.0/linux/hid-flash binary on Linux does not have execute bit set

Describe the bug
Execute bit is not set on the hid-flash binary. This causes flash upload to fail when using HID bootloader.

The permission mode for this file is currently:

$ cd /home/brian/dev/arduino-1.8.16/portable/packages/STMicroelectronics/tools/STM32Tools/
$ ls -l 2.1.0/linux/hid-flash
-rw-r--r-- 1 brian brian 42728 Sep 28 15:00 2.1.0/linux/hid-flash

To Reproduce

  1. Install Arduino IDE 1.8.16 on Ubuntu 20.04.
  2. STM32duino 2.1.0 in Arduino IDE.
  3. Install HID Bootloader into STM32 blue pill (https://github.com/Serasidis/STM32_HID_Bootloader).
  4. Select "Upload Method: HID Bootloader 2.2" in IDE menu.
  5. Attempt to upload any sketch.

Result:

java.io.IOException: Cannot run program "/home/brian/dev/arduino-1.8.16/portable/packages/STMicroelectronics/tools/STM32Tools/2.1.0/linux/hid-flash": error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:485)
	at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11)
	at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
	at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:197)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
	at processing.app.SketchController.upload(SketchController.java:732)
	at processing.app.SketchController.exportApplet(SketchController.java:703)
	at processing.app.Editor$UploadHandler.run(Editor.java:2075)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 11 more
An error occurred while uploading the sketch

Expected behavior

Compiled binary should upload properly.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.3 LTS
  • Arduino IDE version: 1.8.13, 1.8.16
  • STM32 core version: 2.1.0
  • Tools menu settings if not the default: [...]
  • Upload method: HID Bootloader 2.2

Board (please complete the following information):

  • Name: STM32F103CB "blue pill"
  • Hardware Revision: [...]
  • Extra hardware used if any: [...]

Additional context

The same binary in 2.0.0 has the execute bit set:

$ $ cd /home/brian/dev/arduino-1.8.13/portable/packages/STMicroelectronics/tools/STM32Tools/
$ ls -l 2.0.0/linux/hid-flash
-rwxrwxr-x 1 brian brian 42728 Apr 14 15:00 2.0.0/linux/hid-flash

The problem is fixed if I manually set the execute-bit:

$ chmod +x 2.1.0/linux/hid-flash

Can dfu-util be updated?

I might be wrong, but it looks like the included dfu-util tool (at least on Windows) is quite an old version.

I can't get it to detect any STM32F4 microcontroller in DFU mode - either running the built-in bootloader or my own DFU bootloader in flash. I haven't tried with any other STM family yet.

More recent versions of dfu-util seem to work fine with these boards. I tested with v0.9, which seems to be the latest, and was able to get it to work by dropping it into the tools/win directory (along with the libusb-1.0.dll it is packaged with). This makes it simple to add dfu-util as an upload method in the Arduino_Core_STM32, and seems to work for me with chips that have the DFU bootloader built into them.

Is there any reason not to do this? Or should the included dfu-util be working as-is - is anyone else using it successfully?

If it's just a matter of dropping in the updated dfu-util, I can put together a pull request. It just seems too straightforward, so I figure either there's a reason not to do it, or there's more to it than I'm seeing.

maple_loader.jar crash

maple_loader.jar crashes when I try to upload a sketch to an maple mini clone (with bootloader 2.0) via DFU.
It doesn't matter which sketch - I used blink for testing. Same issue with Arduiono IDE and PlatformIO.
I using the current 1.9.0 release with Arduino 1.8.13 or PlatformIO 5.1.0 on Win10 20H2 with Java 15.0.27.
With Java 8.280 - same issue.

Errorlog attached. Seems that the jSSC-2.8_x86_64.dll is the issue.

I tried by myself to build a new maple_loader.jar from source with jssc2.9.2.jar- this is working without issues.

hs_err_pid10232.log

Thank you

STM32_Programmer.sh not found in Ubuntu 18.04. Edited PATH, and still can't find it.

Hello,
I'm having issues uploading code to my STM32F103C8 board. When I try to upload the file, it throws out this error:

STM32_Programmer.sh not found.
An error occurred while uploading the sketch
Please install it or add '/bin' to your PATH environment:
https://www.st.com/en/development-tools/stm32cubeprog.html
Aborting!

I installed the STM32CubeProgrammer, to it's default location, which ended up being:
/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin

Then I tried editing my .bashrc file, and added the following line to the end of the file:
export PATH="/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin:$PATH"

I updated the .bashrc by using the following command:

$source ~/.bashrc

It still gives me the same error when I'm uploading the code.

Am I doing something wrong? I could use some help.

Thank you.

Nucleo flasher windows bat doesnt always work

There seems to be an issue with the way the original nucleo flasher windows bat works.

I've now replaced it with a version that uses WMIC, but this needs to be tested by more users

stm32duino.com - impossible to read or login (Cookie Acceptance Required - no way to accept)

This probably isn't the best place to ask, but I don't know how else to ask it. I'm unable to login to stm32duino.com, search or even read a page as a guest. All I get is a notice that says "Cookie Acceptance Required", but I see no way to accept cookies, despite disabling all forms of blocking and tracking protection.

This also meant I couldn't use the Contact link, at the bottom of the login page, to ask you about it.

This is what it says when I try to login:

Cookie Acceptance Required

You must accept the Cookie Policy of Arduino for STM32 before you can either register on this site or, if you are already registered, before you can login to the site.

This is what it says, in a dialog box, when I click any link on the site, including "Contact us"

You cannot access links on this board until you have accepted the Cookie Policy.

Is the forum dead? If so, a notice saying so would be helpful, but I see there is still a link to it near the top of the github page here:

https://github.com/stm32duino

Unable to upload using massStorageCopy

From @RickKimball on June 10, 2017 16:22

I'm creating a new variant for the NUCLEO-F030R8. When using the massStoraryCopy build, platform.txt uses the {node} parameter of the board to decide where to copy the bin file at upload time. This fails for me when I follow the scheme used by all the other board.txt entries.

On my 64 bit linux 16.04, my NUCLEO-F030R8 board shows up with the name mass storage name of "NUCLEO" instead of "NODE_F030R8".

I tried running Win7 in a VM and it also shows up as "NUCLEO" there.

Is there an expected driver or udev entry I'm supposed to be using? Or should the my board entry look like this:

Nucleo_64.menu.Nucleo_64_board.NUCLEO_F030R8.node=NUCLEO

BTW: that works properly

Copied from original issue: stm32duino/Arduino_Core_STM32#23

[STM32CubeProg.sh] mass erase bug

Followup for stm32duino/Arduino_Core_STM32#1637

Problem:
Some devices (at least the STM32G031J6) require a full mass erase for proper uploads.
However the mass erase is not executed due to a problem in STM32CubeProg.sh

Fix:
The mass erase is already foreseen here:

${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE:+"-e all"} -q -d "${FILEPATH}" ${ADDRESS} "${OPTS}"

However, the sh syntax is not correct. In order to apply "-e all" in case of an empty "ERASE" variable, the "-" sign must be used:

${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE:-"-e all"} -q -d "${FILEPATH}" ${ADDRESS} "${OPTS}"

STM32CubeProgrammer (v2.10.0) is trashing option bytes on the STM32L4R5; leaving the device in an unusable state.

I'm using a Swan R5 (STM32L4R5). About 50% of the time when I flash code using the Arduino IDE, then my option bytes are left in such a state that the device will no longer operate.

I can reset the option bytes and flash the firmware using STM32Programmer application, and the Swan will work as expected.

Here is the bad state set by the Arduino IDE when it errors:
image

Here is the state I am restoring it to:
image

I'm running Pop!_OS (Debian) Linux 21.10 and Arduino IDE 1.8.19.

This has happened on two separate boards now. Should I be modifying any additional registers to restore the board, and is there something I can do to prevent this from happening in the future. It did not used to happen before (older version of Linux and Arduino IDE), and now it happens quite frequently.

[dfu-util] Cannot execute i686 files on 32-bit systems

First off, I apologize if I am misunderstanding the structure of linux/linux_x86_64.

From what I can tell, the linux directory is for i686 systems (32-bit). However, when I was just trying to test it in a 32-bit virtualized environment, it seems that both versions of dfu-util are compiled for 64-bit systems and will not execute on 32-bit.

I was running this in Ubuntu 16.04, 32-bit, in VMWare Fusion on my mac.

Error:

$ ./linux/dfu-util/dfu-util
bash: ./linux/dfu-util/dfu-util: cannot execute binary file: Exec format error

Relevant output:

$ uname -m
i686

$ file ./linux/dfu-util/dfu-util
./linux/dfu-util/dfu-util: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib, for GNU/Linux 2.6.32, BuildID[sha1]=c58354ce3ca661a39bc97aacb5beffa73cf5dfb3, not stripped

$ file ./linux/dfu-util_x86_64/dfu-util
./linux/dfu-util_x86_64/dfu-util: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib, for GNU/Linux 2.6.32, BuildID[sha1]=683c50b08daafbb5db685fc3d9503d0c160fe108, not stripped

build_opt.h

A project compiles cleanly under arduino-1.8.13. Under arduino ide 2.0.0 compilation fails. (log attached).
The project compiles cleanly under ide 2.0.0 if the file 'build_opt.h' is deleted:

$ more build_opt.h 
-DUSB_PRODUCT_STRING=\"vacuum\ pump\ controller\"

opinion?

output.txt

STM32CubeProgrammer manual install?

Hello,

For my own curiosity may I know why the STM 32cubeprogrammer is not installed automatically but manually?

I can't see any pro in this but for sure I am wrong

[STM32CubeProgrammer] "-e all" does not work for STM32G031J6 (Serial method)

Not sure where I can address the issue with the "-e all" commandline option for STM32CubeProgrammer.
So I put it here:

The "-e all" mass erase option does not work with the STM32G031J6. The following error is generated by the commandline version (Linux, USART interface):

Chip ID: 0x466 
BootLoader protocol version: 3.1
Device name : STM32G03x/STM32G04x
Flash size  : 64 KBytes (default)
Device type : MCU
Revision ID : --  
Device CPU  : Cortex-M0+


Mass erase ... 

Error: Mass erase operation failed.

Note: The J6 device only has 32KB Flash ROM.

See also #81

genpinmap doesn't support stm32f10x chips

When I try to use genpinmap with an stm32f103 board I get the message:

"STM32F10xx MCU not supported due to older GPIO IP version"

How did you generate the PeriphalPins.c used with the NUCELO_F103RB and DISCO_F100RB ?

two output channels for PWM inverted problem

Hi I know this is not a place probabbly to rise question like this but cant find answer nowhere....
Basically I want two PWM outputs to be shifted with some dead-time between.. but i just cant set two pwm channels to output at same time. Here is my arduino script for STM32F103CT
#define pin PA0
#define pin2 PA1

#define POT_IN PA4
int PotValue4;
int VB;
int dutyCycle;

//TIM_TypeDef *Instance = TIM1;
//TIM_TypeDef *Instance2 = TIM2;
TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(digitalPinToPinName(pin), PinMap_PWM);
uint32_t channel = STM_PIN_CHANNEL(pinmap_function(digitalPinToPinName(pin), PinMap_PWM));
HardwareTimer *MyTim = new HardwareTimer(Instance);

TIM_TypeDef *Instance2 = (TIM_TypeDef *)pinmap_peripheral(digitalPinToPinName(pin2), PinMap_PWM);
uint32_t channel2 = STM_PIN_CHANNEL(pinmap_function(digitalPinToPinName(pin2), PinMap_PWM));
HardwareTimer *MyTim2 = new HardwareTimer(Instance2);

void Update_IT_callback(void)
{
//float VB = analogRead(POT_IN);
//MyTim->setOverflow(100000, MICROSEC_FORMAT);
//Serial.println("UITC");
}
void Update_IT_callback2(void)
{
//float VB = analogRead(POT_IN);
//MyTim->setOverflow(100000, MICROSEC_FORMAT);
//Serial.println("UITC");
}
void Compare_IT_callback(void)
{
VB = analogRead(POT_IN);
Serial.println(VB);
dutyCycle = map(VB, 0, 900, 50, 10);
//Serial.println(dutyCycle);
//MyTim->setOverflow(dutyCycle, MICROSEC_FORMAT);
MyTim->setCaptureCompare(channel, dutyCycle, PERCENT_COMPARE_FORMAT);
//Serial.println("CITC");
}

void Compare_IT_callback2(void)
{
VB = analogRead(POT_IN);
Serial.println(VB);
dutyCycle = map(VB, 0, 900, 50, 10);
//Serial.println(dutyCycle);
//MyTim->setOverflow(dutyCycle, MICROSEC_FORMAT);
MyTim->setCaptureCompare(channel, dutyCycle, PERCENT_COMPARE_FORMAT);
//Serial.println("CITC");
}
void setup()
{
while(!Serial);
Serial.begin(115200);

delay(2000);
Serial.println("STM32F103C blink and serial test");

pinMode(POT_IN, INPUT);
PotValue4 = analogRead(PA4);

MyTim->setMode(channel, TIMER_OUTPUT_COMPARE_PWM1, pin);
MyTim->setOverflow(100000, HERTZ_FORMAT); // 100000 microseconds = 100 milliseconds
MyTim->setCaptureCompare(channel, 50, PERCENT_COMPARE_FORMAT); // 50%
//MyTim->attachInterrupt(Update_IT_callback);
MyTim->attachInterrupt(channel, Compare_IT_callback);

MyTim2->setMode(channel2, TIMER_OUTPUT_COMPARE_PWM1, pin2);
MyTim2->setOverflow(100000, HERTZ_FORMAT); // 100000 microseconds = 100 milliseconds
MyTim2->setCaptureCompare(channel2, 50, PERCENT_COMPARE_FORMAT); // 50%
//MyTim2->attachInterrupt(Update_IT_callback2);
MyTim2->attachInterrupt(channel, Compare_IT_callback2);

MyTim->resume();

}

void loop()
{
//Serial.println(VB);
}

dfu-util Linux 32 bit

I'm trying on Linux with a simple example sketch but got an exec format error:
...
/home/gigi/Arduino/hardware/Arduino_STM32/tools/linux/maple_upload: line 40: /home/gigi/Arduino/hardware/Arduino_STM32/tools/linux/dfu-util/dfu-util: cannot execute binary file: Exec format error
Waiting for /dev/ttyACM0 serial...Done

File dfu-util in my folder /home/gigi/Arduino/hardware/Arduino_STM32/tools/linux/dfu-util:
./dfu-util: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib, for GNU/Linux 2.6.32, BuildID[sha1]=c58354ce3ca661a39bc97aacb5beffa73cf5dfb3, with debug_info, not stripped

Editing the maple_upload by commenting out line 39:
DFU_UTIL=/usr/bin/dfu-util
#DFU_UTIL=${DIR}/dfu-util/dfu-util
in order to use system wide dfu-util, give me the error:
...
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Waiting for /dev/ttyACM0 serial...Done
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: No DFU capable USB device available

Linux Ubuntu 18.04 32 bit on old Acer TravelMate2420, Arduino IDE 1.8.10 with STM32duino bootloader

stlink_upload.bat does not work with sloeber v4.3 (solution here, Request for Comments)

Hello

I have tried to use the stm32duino with sloeber.
It seems that a lot of them works great. Expect for the upload tool.

Sloeber calls the tool that way:

Launching: C:\sloeber\/arduinoPlugin/packages/STM32/hardware/stm32/tools/win/stlink_upload.bat no_altID no_altID C:\code\sloeber\test_1_3_2/Release/test_1_3_2.bin

the batch file tells me that it cant find the file.

If i add

set str=%3

after

set str=%str:/=\%

then it works like a charm.

So is there any need to adjust the batch file or where does the failure happen?
Does sloeber call the batch file the wrong way?

Thanks

"'java' is not recognized" error with Arduino 2.0.3 and maple 2 uploader

I just installed Arduino 2.0.3 and attempted to upload to a previously working Generic STM32F1 (Blue Pill) board using Maple DFU Bootloader 2.0. I got the error:

'java' is not recognized as an internal or external command,
operable program or batch file.

I assume this error is related to the fact that Arduino is no longer built on Java.

I tried to install my own Java version, but then I got the error reported in this previous bug:

#67

Any hints, fixes or workarounds would be appreciated.

Thanks.

Sloeber expects the tools folder to be in a different folder

Hi,

Im currently testing sloeber with stm32duino.
Unfortunatle sloeber tries to call the stlink tools at a wrong place:

Launching: C:\sloeber\/arduinoPlugin/packages/STM32/hardware/stm32/tools/win/stlink_upload.bat

As you can see here, sloeber expects the tools to be under hardware instead of tools.

The correct path would be:

tools\STM32Tools\1.1.0\tools

Where do we specify this path?
Is this a sloeber related problem or is it a misconfigured textfile from stm32duino?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.