2323#include " mbed_error.h"
2424#include " Timer.h"
2525#include " HeapBlockDevice.h"
26- #include " FlashSimBlockDevice.h"
2726#include " SlicingBlockDevice.h"
2827#include " greentea-client/test_env.h"
2928#include " unity/unity.h"
@@ -50,17 +49,15 @@ SlicingBlockDevice flash_bd(&bd, 0, 16 * 4096);
5049#include " SDBlockDevice.h"
5150SDBlockDevice bd (MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO,
5251 MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
53- SlicingBlockDevice slice_bd (&bd, 0 , 512 * 512 );
54- FlashSimBlockDevice flash_bd (&slice_bd);
52+ SlicingBlockDevice flash_bd (&bd, 0 , 512 * 512 );
5553
5654#elif defined(TEST_FLASHIAP)
5755#include " FlashIAPBlockDevice.h"
5856FlashIAPBlockDevice flash_bd (0xF0000 , 0x10000 );
5957
6058#else
6159#define USE_HEAP_BD 1
62- HeapBlockDevice bd (8 * 4096 , 1 , 1 , 4096 );
63- FlashSimBlockDevice flash_bd (&bd);
60+ HeapBlockDevice flash_bd (8 * 4096 , 1 , 1 , 4096 );
6461#endif
6562
6663static const int heap_alloc_threshold_size = 4096 ;
@@ -129,19 +126,18 @@ static void white_box_test()
129126 printf (" \n\n BD #%d: size %d, read %d, prog %d, erase %d\n " ,
130127 bd_num, bdp->size , bdp->read_size , bdp->prog_size , bdp->erase_size );
131128 HeapBlockDevice heap_bd (bdp->size , bdp->read_size , bdp->prog_size , bdp->erase_size );
132- FlashSimBlockDevice flash_sim_bd (&heap_bd);
133129 BlockDevice *test_bd;
134130 if (bd_num == num_bds - 1 ) {
135131 test_bd = &flash_bd;
136132 } else {
137- test_bd = &flash_sim_bd ;
133+ test_bd = &heap_bd ;
138134 // We need to skip the test if we don't have enough memory for the heap block device.
139135 // However, this device allocates the erase units on the fly, so "erase" it via the flash
140136 // simulator. A failure here means we haven't got enough memory.
141- flash_sim_bd .init ();
142- result = flash_sim_bd .erase (0 , flash_sim_bd .size ());
137+ heap_bd .init ();
138+ result = heap_bd .erase (0 , heap_bd .size ());
143139 TEST_SKIP_UNLESS_MESSAGE (!result, " Not enough heap to run test" );
144- flash_sim_bd .deinit ();
140+ heap_bd .deinit ();
145141 }
146142
147143 delete[] dummy;
0 commit comments