Skip to content

Commit

Permalink
Merge branch 'esl-epfl:main' into DMA_smart
Browse files Browse the repository at this point in the history
  • Loading branch information
TommiTerza authored Sep 27, 2024
2 parents 0f66fba + 7d5bdf5 commit ee42b13
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 195 deletions.
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

0 comments on commit ee42b13

Please sign in to comment.