Full access to 1MB RAM on STM32H743

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
jimfouch
Posts: 18
Joined: 10 Mar 2010 17:06

Full access to 1MB RAM on STM32H743

#1 Post by jimfouch » 30 Aug 2019 13:57

I'm considering on adding mikroBasic for the ARM to my library ( already have mikroBasic for the PIC & PIC32)

I'm planning on bringing a product to market using the STM32H743 processor. I've downloaded the compiler and did a very simple test program and noticed when I compiled, it was only reporting 128K of RAM. I know the RAM is in different banks/sections, but can the mikroBasic use all of the available RAM?
Attachments
2019-08-30_8-56-54.jpg
2019-08-30_8-56-54.jpg (82.01 KiB) Viewed 2493 times

OldSpring
Posts: 134
Joined: 07 Feb 2007 00:01

Re: Full access to 1MB RAM on STM32H743

#2 Post by OldSpring » 30 Aug 2019 23:05

Hello, MikroE Team:

We are using STM32H743 for our new project. we also need to use USB module to commnication with PC. But we couldn't find the USB Lib for STM32H743 in ARM Compiler. Could you help us to solve this problem? Thank you!

Now we found the same problem that jimfouch found. Rom number is ok, but Ram number has a big different with STM32H743 Datasheet. Could you please help us to solve this problem? Thank you!

Best regards,
Attachments
STM32H743VI.jpg
STM32H743VI.jpg (387.38 KiB) Viewed 2483 times

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Full access to 1MB RAM on STM32H743

#3 Post by stefan.filipovic » 02 Sep 2019 13:59

Hi,

Amount of RAM memory displayed in the statistics window is the value from the .mlk file (Ctrl+Alt+M) -> RAM node.

Code: Select all

<RAM>
          <MIN_ADDR>0x20000000</MIN_ADDR>
          <MAX_ADDR>0x2001FFFF</MAX_ADDR>
</RAM>
It's a DTCM RAM according to the reference manual, page 6.

In the .mlk file you will see the REGIONS node, at this moment the only one defined there is the AXI SRAM called IRAM2.
If you want to use other RAM regions you will need to define it inside the REGIONS node as defined RRAM.
We are using STM32H743 for our new project. we also need to use USB module to commnication with PC. But we couldn't find the USB Lib for STM32H743 in ARM Compiler. Could you help us to solve this problem? Thank you!
Unfortunately, the USB Library for STM32H series is not implemented in the compiler yet, so in this case, I'm unable to assist.

EDIT: Page 128 of the reference manual.

Kind regards,
Last edited by stefan.filipovic on 04 Sep 2019 08:16, edited 2 times in total.
Stefan Filipović

OldSpring
Posts: 134
Joined: 07 Feb 2007 00:01

Re: Full access to 1MB RAM on STM32H743

#4 Post by OldSpring » 02 Sep 2019 21:13

Hello, stefan.filipovic:

Thank you very much for your fast reply.

We don't know how to change .mlk file follow the reference manual. Could you please help us to make the Ram number to 1MB? (Now your compiler show the number only about 131KB, but the manual said it has 1MB RAM) It is very important for us. Thank you very much!

Best regards,

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Full access to 1MB RAM on STM32H743

#5 Post by stefan.filipovic » 03 Sep 2019 13:22

Hi,

Please find the .mlk file in the attachment, just extract it in the following path:
c:\Users\Public\Documents\Mikroelektronika\mikroBasic PRO for ARM\Defs\

You can access those RAM regions in this way using MakeSection built-in routine:

Code: Select all

program Test

dim something as word
main:
  ' create 1000 bytes long RAM section named RAM_REGION_SRAM1 starting from the address 0x30000000
  MakeSection("RAM_REGION_SRAM1", 0x30000000, 1000, "SRAM1")

  ' allocate the variable in RAM_REGION_SRAM1 
  SetSection(something, "RAM_REGION_SRAM1")
  
  something = 0xAA
end.
Read more about MakeSection routine in the compiler's help file.

NOTE: Only DTCM RAM will be displayed in the statistics window.

Kind regards,
Attachments
STM32H743VI.zip
(9.52 KiB) Downloaded 148 times
Stefan Filipović

OldSpring
Posts: 134
Joined: 07 Feb 2007 00:01

Re: Full access to 1MB RAM on STM32H743

#6 Post by OldSpring » 04 Sep 2019 15:16

Hello, stefan.filipovic:

Thank you so much for your fast reply and help. We like MikroE compilers and services.

Also we hope to use USB Lib for STM32H743 soon.

Thank you again!

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Full access to 1MB RAM on STM32H743

#7 Post by stefan.filipovic » 04 Sep 2019 16:37

Hi,

You're welcome.

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroBasic PRO for ARM General”