Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 978
» Latest member: barabek
» Forum threads: 856
» Forum posts: 5,089

Full Statistics

Latest Threads
Download/Debugging Silabs...
Forum: Debug interface scripting
Last Post: Polarisru
Yesterday, 01:38 PM
» Replies: 4
» Views: 1,122
Burning flash and debuggi...
Forum: Debug interface scripting
Last Post: Polarisru
Yesterday, 01:33 PM
» Replies: 0
» Views: 26
Embitz with GCC-ARM
Forum: ArmGCC - EmBlocks
Last Post: Tony201800
30-11-2018, 12:01 AM
» Replies: 0
» Views: 147
emBitz, MK66, Debugger an...
Forum: EmBitz IDE
Last Post: Workalot
27-11-2018, 10:40 AM
» Replies: 1
» Views: 181
EBLINK: STM32L496ZG not s...
Forum: Debug interface scripting
Last Post: vargham
22-11-2018, 09:36 AM
» Replies: 1
» Views: 375
warning: implicit declara...
Forum: ArmGCC - EmBlocks
Last Post: bbennett
17-11-2018, 09:02 PM
» Replies: 1
» Views: 183
Print diagnostic messages...
Forum: EmBitz IDE
Last Post: AVI-crak
13-11-2018, 03:27 PM
» Replies: 0
» Views: 143
The case for CAN
Forum: General
Last Post: DD4DA
02-11-2018, 11:09 AM
» Replies: 3
» Views: 653
Does Embitz support Emwin...
Forum: EmBitz IDE
Last Post: ray911
25-10-2018, 06:03 AM
» Replies: 2
» Views: 473
EmBitz 0.42 and 1.11, iss...
Forum: EmBitz IDE
Last Post: kadim
09-10-2018, 03:50 AM
» Replies: 12
» Views: 4,735

 
  Semihosting error - alignment issue
Posted by: splin - 13-08-2018, 10:34 PM - Forum: ArmGCC - EmBlocks - Replies (1)

I have found a problem with semihosting which seems to be caused by an odd byte aligned string in initialise_monitor_handles.

Board: STM32F407VG Discovery

I was having erratic results with semihosting - somtimes it worked, sometimes it didn't. I created a project using the wizard, enabled semihosting, no standard peripheral library. I managed to reduced the code to a minimum which illustrates the problem:

#include "stm32f4xx.h"
#include <stdio.h>
#include <errno.h>
int i=0, j=0 ,k;

int main(void)
{
    i = printf("\fBegin\n");
    j = errno;
    printf("Done12\n");
}

Nothing is output on the console. Interestingly the first printf() returns 7 which is correct but errno is 22 - EINVAL

Now change the last printf to "Done123\n" and it seems to work - ie. the output appears on the console, but now printf() returns -1 and errno is 0! "Done1234\n" also works as does "Done1234567\n" but "Done12345\n" doesn't.

Investigating further, the problem comes from the constant strings in the rodata part of main.o containing the path name passed to the SYS_OPEN() call via BKPT 0xAB at the start of initialise_monitor_handles() when populating the file descriptor tables. The path string is ":tt" which is used to get the file handles for stdin, stdout and stderr from the gdbserver. When semihosting fails, this string is located at an odd byte address and SYS_OPEN() returns -1 for the stdin FD handle. From the map file:

.rodata.str1.1
                0x200019bf        0x4 d:/development/tools/embitz/1.11/share/em_armgcc/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\librdimon_n.a(rdimon-syscalls.o)
 *fill*         0x200019c3        0x1 

(I am executing from RAM and relocating the vector table to 0x20000000)

Adding '3' to the last printf 16 bit word aligns the ":tt" string and the SYS_OPEN() call suceeds.

So it appears there are two errors - 1) the gdbserver can't handle the path string not being word aligned, and 2) the returns from printf() and errno are wrong. Interestingly when the file handle table is incorrectly setup due to the odd alignment of the path string, printf() eventually calls SYS_WRITEC() via BKPT 0xAB (ouptut a single character) but when semihosting appears to work SYS_WRITE0() is invoked to output the whole string.

Hope there is enough there to resolve the problem. I don't have source to rdimon or newlib so I diagosed the above by stepping through the assembler. I have attached the project.



Attached Files
.zip   Semihosting.zip (Size: 119.91 KB / Downloads: 34)
Print this item

  edit cursor vanishes on return from debug
Posted by: escalator - 10-08-2018, 08:56 PM - Forum: EmBitz IDE - No Replies

hi,
a very minor annoyance: when reverting to edit view from debug view the cursor  vanishes, requiring a re-click on the current edit location.
and while we're at minor annoyances, here is a curiosity (in edit mode):
   
Keep up the good work,
.E

Print this item

  How to create stm32l476 project step by step?
Posted by: Jaguar_showjumping - 07-08-2018, 04:13 PM - Forum: EmBitz IDE - Replies (2)

Hi, everybody!
Could you help me?
I like embitz and use it with stm32f4 and stm32l0.
Now  I need stm32l476 MCU. But I didn't understand how to get it work.
I use only cmsis. Don't like Std P.lib and HAL.

How to create stm32l476 project step by step?
For the first time I got stm32l476-disco board. But in the future I prefer load programs via SWD (stlink) directly into my pcbs

Print this item

  STM32F4 atan2
Posted by: smitjs - 06-08-2018, 05:41 AM - Forum: EmBitz IDE - Replies (3)

I am using STM32F407VGT6 with Embitz.
The board contains an accelerometer, which I have successfully used previously with a STM32F103.
Calculation of the roll and pitch requires the function atan2.
On the STM32F4 I get "undefined reference to `atan2'"
I have included <math.h>
Any help greatly appreciated
Thank you
Johan Smit

Print this item

  STM32F107 support?
Posted by: hoffa444 - 04-08-2018, 04:20 PM - Forum: ArmGCC - EmBlocks - No Replies

Hi!

When following the wizard and selecting a STM32F107, and compiling a "blank" main.c you get errors.
There seems f.i. be file naming errors from the result of the wizard.

Is there really support for this CPU?

best regards Hoffa

Print this item

  EBLINK: STM32L496ZG not supported
Posted by: vierling - 27-07-2018, 07:58 AM - Forum: Debug interface scripting - Replies (1)

Call: eblink -I ST-link -D stm32-auto -G

Return:
EB-link by Gerard Zagema __ALPHA__ Jul 11 2017 08:57:24.

Interface: ST-link
Interface at 1:7 - <BUS>:<ADDR>
Interface type: STlink/V2-1
STmicro device ID: 0x461

Error: Unknown device ID
       Please report this ID so that we can add it.

                                       ^^^^^^^^^^^^^^
Hi, this is what I want to ask: Can you add this target?
I guess, new entries in "stm32l4x.script".
(the target is a Nucleo-144 STM32L496)

Greetings
Thomas

Print this item

  IDE editor preferences saving/loading
Posted by: Stadstot - 09-07-2018, 04:27 AM - Forum: EmBitz IDE - Replies (1)

Is there some mechanism for saving and restoring my customized IDE settings like highlightings and colors, keybindings, foldings and other editors preferences to file or files?
I found some files in appdata/roaming/embitz, but not all settings and all profiles in same file, which is pretty inconvenient if I want to work on someone else's computer.

Print this item

  gcc-arm-none-eabi-7-2018-q2-update-win32
Posted by: AVI-crak - 07-07-2018, 09:09 AM - Forum: ArmGCC - EmBlocks - No Replies

There was a new gcc-arm-none-eabi-7-2018-q2-update-win32. In which there is no default.specs file.
The specification file has a very unusual syntax for me, it is closer to macros - than to monosyllabic expressions.
So I just copied the default.specs from the obsolete gcc to the new one.

Also has received surprising bug.
GCC has removed half of the interrupt functions. He left the interruptions in the wrapper __cplusplus, and removed all the steel.

If the default.specs file is not required for normal work in the popular ide, then how it should look for EmBitz?

Print this item

Question How to compile ASM code?
Posted by: ray911 - 25-06-2018, 03:06 PM - Forum: EmBitz IDE - Replies (4)

MCU:STM32F103VE
Function:IAP

I recently started to learn STM32. The referenced program was compiled successfully in MDK, but after copying to EmBitz, the ASM code can't be compiled.
Does anyone know why? Big Grin 

"IAP.c":
__asm void MSR_MSP ( uint32_t ulAddr )
{
    MSR MSP, r0                    //set Main Stack value
    BX r14
}

"Logs & others":
USER\IAP\iap.c|41|error: expected '(' before 'void'|

||=== Build finished: 1 errors, 1 warnings (0 minutes, 0 seconds) ===|

Print this item

  Sometime debugging not work
Posted by: dccomp - 20-06-2018, 10:10 AM - Forum: EmBitz IDE - No Replies

Hello all,
I bought 15 ST32F407G Discovery boards (at two different dealers). 9 Works completely at 6 comes the error: "debug server is closed / terminated, debug session will stop" when I try to connect with EMBitz (V1.11).
When I connect to the STM32 ST-LINK utility, all the boards work. All have the same (latest) ST-LINK firmware version V2J29M18.
I also got the latest ST-LINK driver and installed.
I work with Windows 10 Pro.
Does anyone have an idea what that could be?

Many thanks for your help.

Print this item