Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error #6

Open
pagdot opened this issue Aug 3, 2019 · 4 comments
Open

Compiling error #6

pagdot opened this issue Aug 3, 2019 · 4 comments

Comments

@pagdot
Copy link

pagdot commented Aug 3, 2019

When compiling, i get following error:

In function ‘mg_gen_ataid’,
    inlined from ‘mg_storage_config’ at src/flash/mflash.c:1174:2:
src/flash/mflash.c:1162:2: error: ‘memset’ offset [509, 512] from the object at ‘buff’ is out of the bounds of referenced subobject ‘reserved7’ with type ‘mg_io_uint8[186]’ {aka ‘unsigned char[186]’} at offset 322 [-Werror=array-bounds]
 1162 |  memset(pSegIdDrvInfo->reserved7, 0x00, 190);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It seems like 190 byte should be set to 0, but there are only 186 available

@Dolu1990
Copy link
Member

Dolu1990 commented Aug 4, 2019

ahh weird, never touched that file, it is probalby due to the last GCC updates
Probably merging the main openocd repo would fix the issue. Would you like to try ?

@MarekPikula
Copy link

The flash driver was removed from upstream on 19.06.2019 (https://sourceforge.net/p/openocd/code/ci/7a93c9e087b7cb0444068a3deb506eb127f758f0/).

@MarekPikula
Copy link

Also when I tried to compile it under MinGW last time there were numerous problems, which already have been fixed upstream, so I guess merging upstream version would be advised.

@MarekPikula
Copy link

Besides @pagdot, a quick fix for this is just to replace 190 with 186. This module is not used for VexRiscv anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants