Giter Club home page Giter Club logo

Comments (5)

Phil242 avatar Phil242 commented on May 30, 2024

Hi,

Problem is first coming from the fact the SDK doesn't compile the USB files of the middle-ware, because the part of the code is commented ! See in file : https://github.com/sipeed/platform-gd32v/blob/master/builder/frameworks/firmware_library.py

The commented code :
`libs = [
env.BuildLibrary(
join("$BUILD_DIR", "standard_peripheral"),
join(FRAMEWORK_DIR, "GD32VF103_standard_peripheral")),

# env.BuildLibrary(

# join("$BUILD_DIR", "usbfs_driver"),

# join(FRAMEWORK_DIR, "GD32VF103_usbfs_driver")),

env.BuildLibrary(
    join("$BUILD_DIR", "RISCV"),
    join(FRAMEWORK_DIR, "RISCV")),

]`

I think the problem start from here.

Cheers,

from platform-gd32v.

nickfox-taterli avatar nickfox-taterli commented on May 30, 2024

C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c:251:20: error: '__packed' undeclared (first use in this function) 251 | *fifo = *((__packed uint32_t *)src_buf); | ^~~~~~~~ C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c:251:20: note: each undeclared identifier is reported only once for each function it appears in C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c:251:28: error: expected ')' before 'uint32_t' 251 | *fifo = *((__packed uint32_t *)src_buf); | ~ ^~~~~~~~~ | ) C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c:251:40: error: expected ')' before 'src_buf' 251 | *fifo = *((__packed uint32_t *)src_buf); | ~ ^~~~~~~ | ) C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c: In function 'usb_rxfifo_read': C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c:274:11: error: '__packed' undeclared (first use in this function) 274 | *(__packed uint32_t *)dest_buf = *fifo; | ^~~~~~~~ C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c:274:19: error: expected ')' before 'uint32_t' 274 | *(__packed uint32_t *)dest_buf = *fifo; | ~ ^~~~~~~~~ | ) C:\Users\TaterLi\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_usbfs_driver\Source\drv_usb_core.c:274:31: error: expected ';' before 'dest_buf' 274 | *(__packed uint32_t *)dest_buf = *fifo; | ^~~~~~~~ | ;

Copy GD32VF103_Firmware_Library App code and uncomment firmware_library.py and recompile.

It looks like some definitions(or code) are not compatible,delete all __packed attr,

I found that many macro undefine,such as USB_HTX_NPFIFO_FS_SIZE 

from platform-gd32v.

nickfox-taterli avatar nickfox-taterli commented on May 30, 2024

I think I should check it out later or try to port the incompatible part myself.

from platform-gd32v.

Phil242 avatar Phil242 commented on May 30, 2024

Sorry, I'm lost: why did you close the issue ? Nothing is solved.

from platform-gd32v.

orzel avatar orzel commented on May 30, 2024

I confirm, i have the same problem, probably the same reason... This ticket is not fixed.

from platform-gd32v.

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.