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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 965
» Latest member: fafal
» Forum threads: 851
» Forum posts: 5,072

Full Statistics

Latest Threads
Does Embitz support Emwin...
Forum: EmBitz IDE
Last Post: ray911
9 hours ago
» Replies: 0
» Views: 20
EmBitz 0.42 and 1.11, iss...
Forum: EmBitz IDE
Last Post: kadim
09-10-2018, 03:50 AM
» Replies: 12
» Views: 3,787
Suggestions future releas...
Forum: EmBitz IDE
Last Post: EmBitz
24-09-2018, 06:26 AM
» Replies: 133
» Views: 61,105
Better assert
Forum: General
Last Post: EmBitz
21-09-2018, 10:14 AM
» Replies: 2
» Views: 490
crash sequence identified
Forum: EmBitz IDE
Last Post: EmBitz
21-09-2018, 10:01 AM
» Replies: 1
» Views: 214
The case for CAN
Forum: General
Last Post: smitjs
04-09-2018, 03:48 PM
» Replies: 2
» Views: 275
does Embitz have watchpoi...
Forum: EmBitz IDE
Last Post: jheissjr
31-08-2018, 03:09 PM
» Replies: 4
» Views: 480
Semihosting error - align...
Forum: ArmGCC - EmBlocks
Last Post: splin
23-08-2018, 01:50 AM
» Replies: 1
» Views: 224
ST-Link V2-1 and Windows ...
Forum: ARM gdb
Last Post: vorosj
20-08-2018, 12:59 PM
» Replies: 54
» Views: 25,608
transferring data to the ...
Forum: EmBitz IDE
Last Post: jheissjr
15-08-2018, 01:04 PM
» Replies: 4
» Views: 920

 
Question Does Embitz support Emwin?
Posted by: ray911 - 9 hours ago - Forum: EmBitz IDE - No Replies

MCU:STM32F429IGT6
OS: none
LCD:5" 800x480  RGB888

Hi~
I recently learned to use a touch screen LCD with emWin Library.
But after adding the library file to Embitz, (Project build options---Linker settings---Libraries---Add---libgui.a)
it seems that there are many errors,
Am I made a mistake? or Embitz does not support it?


emWin Library file:
https://github.com/jserv/stm32f429-lcd-d...ry522_4x9i


emWin\Config\GUIConf.c|83|warning: 'at' attribute directive ignored [-Wattributes]|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(WINDOW.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(WINDOW.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(WIDGET.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(WIDGET.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SPINBOX_CreateIndirect.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SPINBOX_CreateIndirect.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SPINBOX.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SPINBOX.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SLIDER_CreateIndirect.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SLIDER_CreateIndirect.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SLIDER.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SLIDER.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SCROLLBAR_CreateIndirect.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SCROLLBAR_CreateIndirect.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SCROLLBAR.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(SCROLLBAR.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO_SetText.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO_SetText.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO_SetFont.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO_SetFont.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO_CreateIndirect.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO_CreateIndirect.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(RADIO.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(LISTBOX_Font.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(LISTBOX_Font.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(LISTBOX_CreateIndirect.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(LISTBOX_CreateIndirect.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(LISTBOX.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(LISTBOX.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(GUI_ARRAY.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(GUI_ARRAY.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(FRAMEWIN_CreateIndirect.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(FRAMEWIN_CreateIndirect.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(FRAMEWIN.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(FRAMEWIN.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT_SetCursorAtChar.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT_SetCursorAtChar.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT_EnableBlink.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT_EnableBlink.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT_Default.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT_Default.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDITDec.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDITDec.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(EDIT.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(DROPDOWN_SetFont.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(DROPDOWN_SetFont.o)|
||bin\Debug\emwinMove.elf uses VFP register arguments, emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(DROPDOWN_CreateIndirect.o) does not|
||failed to merge target specific data of file emWin\Lib\STemWin522_4x9i_CM4_OS_GCC.a(DROPDOWN_CreateIndirect.o)|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 1 warnings (0 minutes, 39 seconds) ===|

Print this item

  crash sequence identified
Posted by: jheissjr - 17-09-2018, 03:08 PM - Forum: EmBitz IDE - Replies (1)

I identified a sequence of Embitz crashing. It is reproducible on my side. What info is helpful besides the capture?

https://youtu.be/FEVFBXLL4XY



Attached Files Thumbnail(s)
   

.txt   crashrpt.txt (Size: 1.63 KB / Downloads: 16)
Print this item

  The case for CAN
Posted by: smitjs - 01-09-2018, 11:27 AM - Forum: General - Replies (2)

I have been working on various new machines, planters, fire engines, etc for years.
There never was any question, distributed computing was always used. At first 8085 types, then Atmel 328 was used, mainly due to the avalability of Arduino Nano boards and WinAVR.
The AVR does work, but debugging is sadly lacking. I have also used Raspi, and was disgusted with the bootup sequence. That is totally out of the question.
Why use such a horrible operating system on any machine? Nobody wants to wait that long for any machine to start working.
ARM boards became available, and I switched to STM32F103 initially, using Embitz. What a marvellous upgrade! Embitz and the EBmoitor is absolutely marvellous!
Why struggle with AVR? The STM32 units are cheap enough.
The first consideration then is what interconnection type to use between units.
I did use serial in the form of RS485. All micros I used have serial, and it is always easy to add another bit bang one. The problem with a RS485 setup is that it is a master - slave setup.
For fast response, the master has to poll often, resulting in micros spending time looking at serial, while neglecting its real work.
The STM32 units can receive serial without using processor time, but the problem of fast transmit response remain. DMA does not do it for short massages.
I have used Ethernet with the Raspis, disasterly. Those sockets are simply horrible in a moving and shaking machine.
Essentially, any master slave setup is not the best. It has to be multimaster, minimum wiring, and no collisions.
No wonder canbus is used so widely. It is really the answer.
It appears all the STM32 units has the provision for Canbus. It is easily applied, does not use processor time for receiving, and has numerous filters to block any unwanted messages.
To use the full Canbus specs, driver chips must be used, but canbus can even be used without that. See Siemens Appnote AP2921. Their one wire setup can  be extended simply by using LM393 comparators and higher voltage on the one wire. That will be the cheapest setup for longer connections.
Canbus will transmit when the bus becomes free, the processor only posts the txmessage.
Received messages are filtered and stored, the processor reads the messages when there is time available, no interrupts are required, and no unnecessary messages are received.
The filters only pass messages intended for the particular unit.
The initial code for a STM32F407 is
 //p1099 CAN master control register Page numbers refer to the STM32F407 reference manual
  CAN1->MCR &= (~(uint32_t)CAN_MCR_SLEEP); //wake up from sleep mode
  CAN1->MCR = (CAN_MCR_INRQ);       //p1083 init mode, disable auto retransmission//CAN_MCR_NART |
  uitime = uimillis + 500;
  while(!(CAN1->MSR & CAN_MSR_INAK)){assert(uimillis, <, uitime);} //p1083 wait for confirmation
 
Set up the baudrate

  //A good rule of thumb is to have your sampling point at 70-80% of the nominal bit time.
  //p1095 For 125Khz CAN: APB1 42Mhz;(APB1 clocked at 42 MHz)
  // quanta 1+9+4 = 14, 14 * 24 = 336, 42000000 / 336 = 125000
  // CAN Baudrate = 125Kbps (CAN clocked at 42 MHz) Prescale = 24

Code:
  CAN1->BTR  = 0x01 << 24; //p1108 CAN bit timing register  Resynchronization jump width
  CAN1->BTR |= 0x03 << 20; //TS2 tBS2 = tq x (TS2[2:0] + 1)p1108
  CAN1->BTR |= 0x08 << 16; //TS1 tBS1 = tq x (TS1[3:0] + 1)p1109
  CAN1->BTR |= 0x17;       //prescaler 24 p1109
  CAN1->FMR  = 0x0E << 8;   //p1116 CAN filter master register
This must be changed to the required speed and APB1 clock speed
Set up the receive filters

Code:
  CAN1->FMR  = 0x0E << 8;   //p1116 CAN filter master register
  CAN1->FMR |= 1;          //p1116 Initialization mode for the filters.
  CAN1->FM1R = 0;          //p1117 Filter mode register 1:32bit filters mask mode
  CAN1->FS1R  = 0x0FFFFFFF;//p1117 Single 32-bit scale configuration
  CAN1->FFA1R = 0x00000000;//p1118 Fifo assignment register
  CAN1->sFilterRegister[0].FR1 = 0x00B << 21;//p1091,1119 COMP
  CAN1->sFilterRegister[1].FR1 = 0x00D << 21;//p1091,1119 COMP
  CAN1->sFilterRegister[0].FR2 = 0x47F << 21;//p1091,1119 MASK
  CAN1->sFilterRegister[1].FR2 = 0x47F << 21;//p1091,1119 MASK
  CAN1->FA1R  = 0x00000001;//p1118 filter activation register filters 0 only
  CAN1->FMR   = 0x0E << 8; //p1116 CAN filter master register clear init bit
  CAN1->MCR &= ~(CAN_MCR_INRQ);// p1083 normal mode
  uitime = uimillis + 500;
  while(CAN1->MSR & CAN_MSR_INAK){assert(uimillis, <, uitime);};  //p1083 wait for confirmation

Set up a tx message struct

Code:
typedef struct
{ u16   id;                 // 11 bit identifier
  u8    data[8];            // Data field
  u8    len;                // Length of data field in bytes
  u8    format;             // 0 - STANDARD, 1- EXTENDED IDENTIFIER
  u8    type;               // 0 - DATA FRAME, 1 - REMOTE FRAME
}canmsg;
canmsg cantxmsg;

I found that most messages used were the 11bit id only, or id + 1. The full 8 bytes data was rarely used.
The transmit code:

Code:
  while(!(CAN1->TSR & (1 << 26)))//p1103 TME0 Mailbox empty
  {assert(uimillis, <, uitime);} //NAK?
  CAN1->sTxMailBox[0].TIR = 0;                     //p1110
  CAN1->sTxMailBox[0].TIR |= (txmsg->id << 21)|txmsg->type;
  CAN1->sTxMailBox[0].TDTR = (txmsg->len & 0x07);    //p1111
  if(0 == txmsg->len)
 { CAN1->sTxMailBox[0].TDLR = (txmsg->data[0]);
 }else if(1 == txmsg->len)
  { CAN1->sTxMailBox[0].TDLR = ((txmsg->data[1] << 8) |  (txmsg->data[0]));
  }else
  { CAN1->sTxMailBox[0].TDHR = ((txmsg->data[7] << 24) //p1112
                                 |(txmsg->data[6] << 16)
                                 |(txmsg->data[5] <<  8)
                                 |(txmsg->data[4]));
    CAN1->sTxMailBox[0].TDLR = ((txmsg->data[3] << 24)
                                 |(txmsg->data[2] << 16)
                                 |(txmsg->data[1] <<  8)
                                 |(txmsg->data[0]));
  }
  CAN1->sTxMailBox[0].TIR |= 0x01; //p1110 TXRQ

Receive is:

Code:
volatile u32 mail0 = 0;
    rxid = (((CAN1->sFIFOMailBox[0].RIR) >> 21) & 0x07ff);  //p1113 11 bits only (If you require the id in your code)
    datalen = (CAN1->sFIFOMailBox[0].RDTR) & 0x0F; //p1114
    //else if 0 datalen simply read CAN1->sFIFOMailBox[0].RIR
     mail0 = CAN1->sFIFOMailBox[0].RDLR;
      rxdata[0] = (mail0 & 0xFF);
      mail0 >>= 8;
      rxdata[1] = (mail0 & 0xFF);
      mail0 >>= 8;
      rxdata[2] = (mail0 & 0xFF);//p1115
      mail0 >>= 8;
      rxdata[3] = (mail0 & 0xFF);////p1115
      mail0 = CAN1->sFIFOMailBox[0].RDHR;
       rxdata[4] = (mail0 & 0xFF);////p1115
       mail0 >>= 8;
       rxdata[5] = (mail0 & 0xFF);////p1115
       mail0 >>= 8;
       rxdata[6] = (mail0 & 0xFF);////p1115
       mail0 >>= 8;
       rxdata[7] = (mail0 & 0xFF);//p1115
 Change as you like
The filters are not easy to envisage, but can easily be proven by this code:

Code:
  #define COMP 0x00D //change as required
  #define MASK 0x47F  //change as required
  u16 id= 0;
     for(id=0; id < 0x800; id++)
        {// printf("%d ",id);
            if ((id & MASK) == COMP)
           { printf("0x%03X\n", id);
           }
        }
Canbus is also easily tested in logic analysers.
I am not aware of anything that can beat canbus for interconnection.
I hope this post is of help to somebody.
Johan Smit

Print this item

  does Embitz have watchpoints
Posted by: jheissjr - 15-08-2018, 02:18 PM - Forum: EmBitz IDE - Replies (4)

I saw a tutorial on Mcuoneclipse.com discussing watchpoints in Eclipse and CDT. I have used them and they come in handy at times. Does EmBitz have watchpoints?

https://mcuoneclipse.com/2018/08/11/tuto...tchpoints/

Print this item

  Find function declaration with custom Makefile
Posted by: Konami - 14-08-2018, 01:58 PM - Forum: EmBitz IDE - No Replies

I'm using a custom Makefile to build my EmBitz project so that the code can be portable between systems and doesn't require an IDE to simply build. However, the EmBitz is unable to find the declarations of any of my functions from included libraries. I added the directories to the Additional Search Paths in C/C++ Parser Options but I'm guessing it should be going somewhere else.

Print this item

  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: 17)
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