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

fix example_data_processing_from_flash #591

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def write_arr_flash_only(f, name, arr, ctype, size):
f.write('#ifndef MATRICES_H_\n')
f.write('#define MATRICES_H_\n')
f.write('// This file is automatically generated\n')
f.write('#ifdef FLASH_LOAD\n')


SIZE = 64
SIZE = 32
RANGE = 10

m_a = []
Expand All @@ -59,6 +59,7 @@ def write_arr_flash_only(f, name, arr, ctype, size):
write_arr(f, 'B', B, 'int32_t', SIZE)
write_arr(f, 'C', C, 'int32_t', SIZE)

f.write('#endif\n')
f.write('#define MATRIX_SIZE %d\n' % SIZE)


Expand Down
6 changes: 6 additions & 0 deletions sw/applications/example_data_processing_from_flash/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ int32_t buffer_data[MATRIX_SIZE*TILING_ROWS] = {0};
int32_t output_matrix[MATRIX_SIZE*MATRIX_SIZE] = {0};

int main(int argc, char *argv[]) {
#ifndef FLASH_LOAD
PRINTF("This application is meant to run with the FLASH_LOAD linker script\n");
return EXIT_SUCCESS;
#else

soc_ctrl_t soc_ctrl;
soc_ctrl.base_addr = mmio_region_from_addr((uintptr_t)SOC_CTRL_START_ADDRESS);
Expand Down Expand Up @@ -84,4 +88,6 @@ int main(int argc, char *argv[]) {
}
PRINTF("All tests passed!\n");
return EXIT_SUCCESS;

#endif
}
Loading
Loading