在上电过程中,会有一个窗口期,如果在这个事件段内有Intel授权,那么可以打开调试功能。(There is a limited time during the boot for which this feature can be used by an Intel entity (i.e., an entity authenticated by a per-part Intel key hash stored in the product). The entity must perform the authentication (and unlocking) through this hardware-based mechanism before any secure assets are distributed from its rest location (note: “rest location” refers to where an asset is stored))
ESP32 带有 WIFI 功能,而众所周知要想让一个设备连接WIFI AP 需要告知设备对应 AP 的名称和密码,简单实验的话,可以直接在代码中写死这两个参数,但这种情况下烧写之后设备只能在固定的环境下使用。https://github.com/tzapu/wifimanager 这个项目可以解决上述问题。先说一下这个东西如何使用:
/**
External function. Initializes memory services based on the memory
descriptor HOBs. This function is responsible for priming the memory
map, so memory allocations and resource allocations can be made.
The first part of this function can not depend on any memory services
until at least one memory descriptor is provided to the memory services.
@param HobStart The start address of the HOB.
@param MemoryBaseAddress Start address of memory region found to init DXE
core.
@param MemoryLength Length of memory region found to init DXE core.
@retval EFI_SUCCESS Memory services successfully initialized.
**/
EFI_STATUS
CoreInitializeMemoryServices (
IN VOID **HobStart,
OUT EFI_PHYSICAL_ADDRESS *MemoryBaseAddress,
OUT UINT64 *MemoryLength
)
//
// Allocate the EFI System Table and EFI Runtime Service Table from EfiRuntimeServicesData
// Use the templates to initialize the contents of the EFI System Table and EFI Runtime Services Table
//
gDxeCoreST = AllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);
ASSERT (gDxeCoreST != NULL);
gDxeCoreRT = AllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);
ASSERT (gDxeCoreRT != NULL);
gDxeCoreST->RuntimeServices = gDxeCoreRT;
FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
#
# These firmware volumes will have files placed in them uncompressed,
# and then both firmware volumes will be compressed in a single
# compression operation in order to achieve better overall compression.
#
SECTION FV_IMAGE = PEIFV
SECTION FV_IMAGE = DXEFV
}
}
/**
Entry point of the section extraction code. Initializes an instance of the
section extraction interface and installs it on a new handle.
@param ImageHandle A handle for the image that is initializing this driver
@param SystemTable A pointer to the EFI system table
@retval EFI_SUCCESS Driver initialized successfully
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources
**/
EFI_STATUS
EFIAPI
InitializeSectionExtraction (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
(感觉是将 PEI 和 DXE打包在一起)
#elif defined(SPI_HAS_TRANSACTION)
static void init() {
//LABZDebug USB_SPI.begin(); // The SPI library with transaction will take care of setting up the pins - settings is set in beginTransaction()
//LABZDebug_Start
USB_SPI.begin(10,21,19,13); // The SPI library with transaction will take care of setting up the pins - settings is set in beginTransaction()
//LABZDebug_End
SPI_SS::SetDirWrite();
SPI_SS::Set();
}
#elif defined(STM32F4)
//LABZDebug USB_SPI.beginTransaction(SPISettings(26000000, MSBFIRST, SPI_MODE0)); // The MAX3421E can handle up to 26MHz, use MSB First and SPI mode 0
//LABZDebug_Start
USB_SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));
//LABZDebug_End
2.USB_Host_Shield_Library_2.0\UsbCore.h 这里给出用到的SS 和 INT Pin编号