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

Fail to compile sram_test for WaveShare F746IG #65

Open
RndMnkIII opened this issue May 15, 2018 · 0 comments
Open

Fail to compile sram_test for WaveShare F746IG #65

RndMnkIII opened this issue May 15, 2018 · 0 comments

Comments

@RndMnkIII
Copy link

When try to compile this example:
`/** sram_test.ino sram(sdram) test for this board:
DISCOVERY_F746NG
DISCOVERY_F429ZI
ARMFLY_F407ZG
HASEE_III_F103ZE
ILLUMINATI_F407ZG
REDBULL_V2_F103ZE
WAVESHARE_F746IG
Allocate 256k ram, and write to Serial the results
*/
#include <Sram.h>
#include <LED.h>

void setup() {
Led.Init();
Serial.begin(115200);
}

uint32_t size = SRAM_LENTH / 2; /* define in bsp.h*/;
void loop() {
Serial.print("SRAM SIZE: 0x");
Serial.println(size * 2, HEX);
uint32_t start = millis();

uint32_t sum = 0;
uint32_t sum_check = 0;
uint16_t data;
for (int i = 0; i < size; i++) {
data = i & 0xffff;
sum += i & 0xffff;
BSP_SRAM_WriteData(i * 2, &data, 1) ; //uint16_data, addr*2
}

Serial.print("Write time: ");
Serial.print(millis() - start);
Serial.println(" ms");
start = millis();
Led.on();
for (int i = 0; i < size; i++) {
BSP_SRAM_ReadData(i * 2, &data, 1) ;
sum_check += data;
}
Led.off();

Serial.print("Read time: ");
Serial.print(millis() - start);
Serial.println(" ms");

Serial.print("Checksum should be:");
Serial.println(sum);
Serial.print("Checksum calculated:");
Serial.println(sum_check);

if (sum == sum_check) {
Serial.print("SDRAM is working with buffer size: ");
Serial.println(size);
} else {
Serial.println("SDRAM NOT WORKING !!!");
}

delay(5000);
}, Arduino IDE 1.85 generates this error:In file included from C:\Users\javier\Documents\Arduino\sram_test_WS_CORE746C-I\sram_test_WS_CORE746C-I.ino:11:0:

C:\arduino-1.8.5\hardware\STM32GENERIC\STM32\libraries\SRAM\src/Sram.h:5:17: fatal error: bsp.h: No such file or directory

compilation terminated.

exit status 1
Error compilando para la tarjeta F746x(216M).`

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

1 participant