Tag Archives: Embedded

How to Solve J-link Error (Two Command Errors & Solution)

1. The JLINK driver version is too high, resulting in the identification that the JLINK tool is pirated

error reported: the connected probe appears to be a j-link clone

1. Uninstall the high version JLINK driver. The version here is 7.6

find the jink driver installation directory and click Remove J-Link V7.64b

2. Install j-link version 6. X driver

download address: segger – the embedded experts – Downloads – j-link/J-TRACE

install directly after downloading

3. Change the j-link driver under MDK5 to a lower version

find the newly installed JLINK driver installation directory. The default is: C:\Program Files (x86)\SEGGER\JLink_V640b

find jlinkarm.dll file, replace this file under mdk5, and the directory under mdk5 is: ..\MDK528\ARM\Segger

reopen mdk5 and connect the development board to JLINK. At this time, you can view that the JLINK driver version is updated successfully</ font>

2. JLINK chip locked

error reported: JLINK error: could not find core in coresight setup 

found in JLINK installation directory: JLINK.exe

enter after opening:

unlock kinetis

if the connection fails, connect the reset pin on the JLINK download tool and GND to perform the chip burning reset operation. Repeat it several times and it will succeed

[Solved] NO ST-LINK detected/ST-LINK USB communication error

Here is a simple method to solve error: NO ST-LINK detected/ST-LINK USB communication

 

Solution:
① download and install STLINK driver

② update STLINK firmware

③Find stlink_winusb_uninstall.bat in your keil5 installation directory>ARM>STLink>USBDriver directory and click to execute it (i.e. uninstall first), then execute stlink_winusb_install.bat again (i.e. reinstall)

[Solved] keil2 Error: FATAL ERROR L210: I/O ERROR ON INPUT FILE

As shown in the figure: test is the name of the file, and the error message is displayed after * * *

FATAL ERROR L210

Solution: Google and download the file c51fps.lib, then find the Lib of your keil folder. For example, my address is: D:\Keil C51 v6.12\c5\LIB

Different versions may have different folder names. If you’re not sure, copy more and put them all.

Reason: This is the library of floating-point operation. The decimal KEIL2 download package is used. The library without decimal operation needs to be downloaded by yourself.

Clion develops STM32, adds files and compiles with an error “no such file or directory”“

Clion adds files and compiles with an error “no such file or directory”

1.1 adding files

Create folders directly under the project directory and create source files and header files

After addition, errors will occur when writing. C files including. H files, which need to be modified cmakelist. TXT

Add header file

include_directories(Path1/path1 Path2/path2)

path1/path1 indicates the header file path. Different paths are separated by spaces, as shown in the following figure:

Add source file

file(GLOB_RECURSE SOURCES "directory/*.*")

directory indicates the path folder name. The source files under different paths are separated by spaces, as shown in the following figure:

After completion, the compilation can reach 100%, but an error is reported: no such file or directory

By reference: clion 2020.2.4 cmake error reporting

When a newly added file is found, cmakelist. TXT will automatically add linker_ SCRIPT

Delete the header file and source file behind it

set(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/STM32F103RFTx_FLASH.ld)

Compile again, no error will be reported and can be downloaded normally.

Bin File Programming Failed, could not find core in coresight setup, erase error

Failed to burn bin file, could not find core in coresight setup, erase error

Problem-solving method

Question

Flash is locked and cannot be erased when burning bin. What should I do?

Solution:

Use the j-flash tool to select the corresponding kernel model (I use cortex-m33) for erase chip operation. Note that when erasing, the erasing start address is set to 0x8030000. If the default address is 0x8000000, the PBL and SBL will be erased together, and the PBL and SBL need to be burned again.

[Solved] Error calling ICU Library: libicudata.so.51: internal error

I recently ported a front-end that depends on the icu library, and after successful compilation I got the following error
error while loading shared libraries: /usr/lib/libicudata.so.51: internal error
I thought it was a problem with icu version, and tried various versions without success.
I finally found the problem after a long day of searching, the config should add –with-data-packaging=files
The original config configurationICU_CONF_OPT = –with-cross-build=$(HOST_ICU_DIR)/source –disable-samples \
–disable-tests
New Configuration:
ICU_CONF_OPT =     –host=arm-linux-gnueabihf \
–with-cross-build=$(HOST_ICU_DIR)/source \
–prefix=$(STAGING_DIR)/usr  \
–with-data-packaging=files \
–disable-samples \
–disable-tests

line 1: syntax error: unexpected “(“ [How to Solve]

An error occurred while executing the executable on the development board: Line 1: syntax error: unexpected “(”

View the architecture of the executable file with the command objdump – a automiclinux. It is found that it is not the arm architecture

Re cross-compile and transplant it to the development board for execution. It is found that it can run

error: field ‘XXX’ declared as a function [How to Solve]

Problem description

Some time ago, I started a small smart home project to practice my hand. I encountered this problem when compiling

Compilation error:

reason:

The function pointer in the structure element is incorrectly defined

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <wiringSerial.h>

struct Command{
        char cmdName[128];
        char cmd[32];
        int (*init)();		//int init();
        int (*getCmd)(struct Command *voice);	//int getCmd(struct Command *voice);
        char log[1024];
        int fd;
        struct Command *next;
};

Error: l6242e: cannot link object arm_ cos_ f32.o as its attributes are incompat

report errors

I use AC6 as the compiler in keil MDK. I report an error when I transplant DSP library to F4. I configure it according to the online tutorial and report an error after compiling

Error: L6242E: Cannot link object arm_common_tables.o as its attributes are incompatible with the image attributes.
Error: L6242E: Cannot link object arm_cos_f32.o as its attributes are incompatible with the image attributes.

After searching on the Internet for a circle, I found no result. If I see a similar problem, I can’t try to solve it.
https://blog.csdn.net/crown133/article/details/103333704

solve

Finally, we found the answer on arm’s official developer website

in the end https://developer.arm.com/documentation/ka003983/latest
In short, AC5 and 6 wchar_ The default size of T is not the same

according to the solution of the official website, you can open this option here

if you encounter problems in the future, you still need to find answers through official channels