Giter Club home page Giter Club logo

Comments (6)

cnlohr avatar cnlohr commented on June 25, 2024 1

Sadly, at the moment no one is looking into this specific target. If you are up for seeing where we've made a mistake, it would be great to let us know.

There's plarform-specific code in the .ld, Makefile, and ch32v003.h

As a note, when changing the .ld, you will need to remove the auto-generated .ld for your part in the ch32v003fun folder.

Please let us know what you find.

from ch32v003fun.

romainreignier avatar romainreignier commented on June 25, 2024

When setting TARGET_MCU_PACKAGE:=CH32V307VCT6, if I only change manually the generated_CH32V307VCT6.ld file with the following:

--- generated_CH32V307VCT6.ld.orig      2024-04-24 14:54:05.818278697 +0200
+++ generated_CH32V307VCT6.ld   2024-04-24 14:54:15.906340380 +0200
@@ -1,8 +1,8 @@
 ENTRY( InterruptVector )
 MEMORY
 {
-  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K
-  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
+  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K
+  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
 }
 SECTIONS
 {

It works.
Reading the datasheet, I have noted this footnote but I could not find (or more exactly, don't know where to find) more info about this:
image

from ch32v003fun.

cnlohr avatar cnlohr commented on June 25, 2024

@AlexanderMandera - do you recall if you ever tested with CH32V307VCxx? Should this line read 2 instead of 1? MCU_PACKAGE:=1 https://github.com/cnlohr/ch32v003fun/blob/6c3c515598db6d3d50f8087da2f694ee417fc445/ch32v003fun/ch32v003fun.mk#L114C14-L114C18

@romainreignier Can you test with changing that line of that file from 2 to 1, removing the generated .ld file, and seeing if it works then?

from ch32v003fun.

romainreignier avatar romainreignier commented on June 25, 2024

If I change the 1 to a 2, it works but the linker script now contains 128K of flash and 32K of ram while according to the datasheet, the VC variant should be 256/64:
image

from ch32v003fun.

cnlohr avatar cnlohr commented on June 25, 2024

I am just not familiar with the 30x line, does it make sense to add another package type for the 307? You can copy-paste it from one of the other parts, and make a PR.

from ch32v003fun.

bmx avatar bmx commented on June 25, 2024

make TARGET_MCU=CH32V307 TARGET_MCU_PACKAGE=CH32V307VCT6

it should work

MEMORY
{
  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K
  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
}

from ch32v003fun.

Related Issues (20)

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.